mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +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:
@@ -80,11 +80,6 @@ options:
|
||||
required: false
|
||||
default: present
|
||||
choices: [ "present", "absent" ]
|
||||
examples:
|
||||
- code: "postgresql_db: db=acme"
|
||||
description: Create a new database with name C(acme)
|
||||
- code: "postgresql_db: db=acme encoding='UTF-8' lc_collate='de_DE.UTF-8' lc_ctype='de_DE.UTF-8' template='template0'"
|
||||
description: Create a new database with name C(acme) and specific encoding and locale settings. If a template different from C(template0) is specified, encoding and locale settings must match those of the template.
|
||||
notes:
|
||||
- The default authentication assumes that you are either logging in as or sudo'ing to the C(postgres) account on the host.
|
||||
- This module uses I(psycopg2), a Python PostgreSQL database adapter. You must ensure that psycopg2 is installed on
|
||||
@@ -93,6 +88,20 @@ requirements: [ psycopg2 ]
|
||||
author: Lorin Hochstein
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
# Create a new database with name "acme"
|
||||
- postgresql_db: db=acme
|
||||
|
||||
# Create a new database with name "acme" and specific encoding and locale
|
||||
# settings. If a template different from "template0" is specified, encoding
|
||||
# and locale settings must match those of the template.
|
||||
- postgresql_db: db=acme
|
||||
encoding='UTF-8'
|
||||
lc_collate='de_DE.UTF-8'
|
||||
lc_ctype='de_DE.UTF-8'
|
||||
template='template0'
|
||||
'''
|
||||
|
||||
try:
|
||||
import psycopg2
|
||||
import psycopg2.extras
|
||||
|
||||
Reference in New Issue
Block a user