mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00:00
DOCS: standardize on EXAMPLES (a.k.a. Docs-JumboPatch JetLag Edition)
Migrated all examples: in DOCUMENTATION=''' string to standalone EXAMPLES=''' string Added deprecation warning to moduledev.rst and remove deprecated example from it Fixed up a few typos and uppercased some acronyms. add consistency to how EXAMPLES are formatted
This commit is contained in:
@@ -90,17 +90,6 @@ options:
|
||||
required: false
|
||||
default: present
|
||||
choices: [ "present", "absent" ]
|
||||
examples:
|
||||
- code: "postgresql_user: db=acme user=django password=ceec4eif7ya priv=CONNECT/products:ALL"
|
||||
description: Create django user and grant access to database and products table
|
||||
- code: "postgresql_user: user=rails password=secret role_attr_flags=CREATEDB,NOSUPERUSER"
|
||||
description: Create rails user, grant privilege to create other databases and demote rails from super user status
|
||||
- code: "postgresql_user: db=acme user=test priv=ALL/products:ALL state=absent fail_on_user=no"
|
||||
description: Remove test user privileges from acme
|
||||
- code: "postgresql_user: db=test user=test priv=ALL state=absent"
|
||||
description: Remove test user from test database and the cluster
|
||||
- code: INSERT,UPDATE/table:SELECT/anothertable:ALL
|
||||
description: Example privileges string format
|
||||
notes:
|
||||
- The default authentication assumes that you are either logging in as or
|
||||
sudo'ing to the postgres account on the host.
|
||||
@@ -117,6 +106,23 @@ requirements: [ psycopg2 ]
|
||||
author: Lorin Hochstein
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
# Create django user and grant access to database and products table
|
||||
- postgresql_user: db=acme user=django password=ceec4eif7ya priv=CONNECT/products:ALL
|
||||
|
||||
# Create rails user, grant privilege to create other databases and demote rails from super user status
|
||||
- postgresql_user: user=rails password=secret role_attr_flags=CREATEDB,NOSUPERUSER
|
||||
|
||||
# Remove test user privileges from acme
|
||||
- postgresql_user: db=acme user=test priv=ALL/products:ALL state=absent fail_on_user=no
|
||||
|
||||
# Remove test user from test database and the cluster
|
||||
- postgresql_user: db=test user=test priv=ALL state=absent
|
||||
|
||||
# Example privileges string format
|
||||
INSERT,UPDATE/table:SELECT/anothertable:ALL
|
||||
'''
|
||||
|
||||
import re
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user