Validate EXAMPLES as YAML

This commit is contained in:
Matt Martz
2017-02-07 15:39:24 -06:00
committed by Toshio Kuratomi
parent 499d3a1b53
commit 7c00346714
112 changed files with 441 additions and 381 deletions

View File

@@ -67,19 +67,19 @@ options:
EXAMPLES = '''
# Example influxdb_database command from Ansible Playbooks
- name: Create database
influxdb_database:
influxdb_database:
hostname: "{{influxdb_ip_address}}"
database_name: "{{influxdb_database_name}}"
state: present
- name: Destroy database
influxdb_database:
influxdb_database:
hostname: "{{influxdb_ip_address}}"
database_name: "{{influxdb_database_name}}"
state: absent
- name: Create database using custom credentials
influxdb_database:
influxdb_database:
hostname: "{{influxdb_ip_address}}"
username: "{{influxdb_username}}"
password: "{{influxdb_password}}"

View File

@@ -77,7 +77,7 @@ options:
EXAMPLES = '''
# Example influxdb_retention_policy command from Ansible Playbooks
- name: create 1 hour retention policy
influxdb_retention_policy:
influxdb_retention_policy:
hostname: "{{influxdb_ip_address}}"
database_name: "{{influxdb_database_name}}"
policy_name: test
@@ -85,7 +85,7 @@ EXAMPLES = '''
replication: 1
- name: create 1 day retention policy
influxdb_retention_policy:
influxdb_retention_policy:
hostname: "{{influxdb_ip_address}}"
database_name: "{{influxdb_database_name}}"
policy_name: test
@@ -93,7 +93,7 @@ EXAMPLES = '''
replication: 1
- name: create 1 week retention policy
influxdb_retention_policy:
influxdb_retention_policy:
hostname: "{{influxdb_ip_address}}"
database_name: "{{influxdb_database_name}}"
policy_name: test
@@ -101,7 +101,7 @@ EXAMPLES = '''
replication: 1
- name: create infinite retention policy
influxdb_retention_policy:
influxdb_retention_policy:
hostname: "{{influxdb_ip_address}}"
database_name: "{{influxdb_database_name}}"
policy_name: test

View File

@@ -183,7 +183,7 @@ EXAMPLES = """
state: present
# Example privileges string format
mydb.*:INSERT,UPDATE/anotherdb.*:SELECT/yetanotherdb.*:ALL
# mydb.*:INSERT,UPDATE/anotherdb.*:SELECT/yetanotherdb.*:ALL
# Example using login_unix_socket to connect to server
- mysql_user:
@@ -200,10 +200,9 @@ mydb.*:INSERT,UPDATE/anotherdb.*:SELECT/yetanotherdb.*:ALL
sql_log_bin: no
# Example .my.cnf file for setting the root password
[client]
user=root
password=n<_665{vS43y
# [client]
# user=root
# password=n<_665{vS43y
"""
import getpass

View File

@@ -189,7 +189,7 @@ EXAMPLES = '''
state: absent
# Example privileges string format
INSERT,UPDATE/table:SELECT/anothertable:ALL
# INSERT,UPDATE/table:SELECT/anothertable:ALL
# Remove an existing user's password
- postgresql_user: