mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
influxdb: fix missing arg specs (#33859)
* influxdb: fix missing arg specs * influxdb: doc: move database_name spec to doc fragments * influxdb: cleanup unused import
This commit is contained in:
parent
20ce0bde30
commit
5bcc9cd1c3
4 changed files with 23 additions and 27 deletions
|
@ -25,17 +25,12 @@ requirements:
|
|||
- "influxdb >= 0.9"
|
||||
- requests
|
||||
options:
|
||||
database_name:
|
||||
description:
|
||||
- Name of the database that will be created/destroyed
|
||||
required: true
|
||||
state:
|
||||
description:
|
||||
- Determines if the database should be created or destroyed
|
||||
choices: ['present', 'absent']
|
||||
- Determines if the database should be created or destroyed.
|
||||
choices: [ present, absent ]
|
||||
default: present
|
||||
required: false
|
||||
extends_documentation_fragment: influxdb.documentation
|
||||
extends_documentation_fragment: influxdb
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
|
@ -44,7 +39,6 @@ EXAMPLES = '''
|
|||
influxdb_database:
|
||||
hostname: "{{influxdb_ip_address}}"
|
||||
database_name: "{{influxdb_database_name}}"
|
||||
state: present
|
||||
|
||||
- name: Destroy database
|
||||
influxdb_database:
|
||||
|
@ -58,18 +52,16 @@ EXAMPLES = '''
|
|||
username: "{{influxdb_username}}"
|
||||
password: "{{influxdb_password}}"
|
||||
database_name: "{{influxdb_database_name}}"
|
||||
state: present
|
||||
ssl: False
|
||||
validate_certs: False
|
||||
ssl: yes
|
||||
validate_certs: yes
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
#only defaults
|
||||
# only defaults
|
||||
'''
|
||||
|
||||
try:
|
||||
import requests.exceptions
|
||||
from influxdb import InfluxDBClient
|
||||
from influxdb import exceptions
|
||||
except ImportError:
|
||||
pass
|
||||
|
|
|
@ -25,10 +25,6 @@ requirements:
|
|||
- "influxdb >= 0.9"
|
||||
- requests
|
||||
options:
|
||||
database_name:
|
||||
description:
|
||||
- Name of the database where retention policy will be created
|
||||
required: true
|
||||
policy_name:
|
||||
description:
|
||||
- Name of the retention policy
|
||||
|
@ -45,7 +41,7 @@ options:
|
|||
description:
|
||||
- Sets the retention policy as default retention policy
|
||||
required: true
|
||||
extends_documentation_fragment: influxdb.documentation
|
||||
extends_documentation_fragment: influxdb
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
|
@ -57,8 +53,8 @@ EXAMPLES = '''
|
|||
policy_name: test
|
||||
duration: 1h
|
||||
replication: 1
|
||||
ssl: True
|
||||
validate_certs: True
|
||||
ssl: yes
|
||||
validate_certs: yes
|
||||
|
||||
- name: create 1 day retention policy
|
||||
influxdb_retention_policy:
|
||||
|
@ -83,19 +79,18 @@ EXAMPLES = '''
|
|||
policy_name: test
|
||||
duration: INF
|
||||
replication: 1
|
||||
ssl: False
|
||||
validate_certs: False
|
||||
ssl: no
|
||||
validate_certs: no
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
#only defaults
|
||||
# only defaults
|
||||
'''
|
||||
|
||||
import re
|
||||
|
||||
try:
|
||||
import requests.exceptions
|
||||
from influxdb import InfluxDBClient
|
||||
from influxdb import exceptions
|
||||
except ImportError:
|
||||
pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue