mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
Validate EXAMPLES as YAML
This commit is contained in:
committed by
Toshio Kuratomi
parent
499d3a1b53
commit
7c00346714
@@ -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}}"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user