Use native YAML in the examples (#3441)

This commit is contained in:
Fabio Alessandro Locati 2016-11-11 22:33:32 +00:00 committed by Matt Clay
parent 8822021132
commit 1e00adefd5
2 changed files with 22 additions and 12 deletions

View file

@ -73,16 +73,23 @@ options:
EXAMPLES = ''' EXAMPLES = '''
# Generate an OpenSSL private key with the default values (4096 bits, RSA) # Generate an OpenSSL private key with the default values (4096 bits, RSA)
# and no public key # and no public key
- openssl_privatekey: path=/etc/ssl/private/ansible.com.pem - openssl_privatekey:
path: /etc/ssl/private/ansible.com.pem
# Generate an OpenSSL private key with a different size (2048 bits) # Generate an OpenSSL private key with a different size (2048 bits)
- openssl_privatekey: path=/etc/ssl/private/ansible.com.pem size=2048 - openssl_privatekey:
path: /etc/ssl/private/ansible.com.pem
size: 2048
# Force regenerate an OpenSSL private key if it already exists # Force regenerate an OpenSSL private key if it already exists
- openssl_privatekey: path=/etc/ssl/private/ansible.com.pem force=True - openssl_privatekey:
path: /etc/ssl/private/ansible.com.pem
force: True
# Generate an OpenSSL private key with a different algorithm (DSA) # Generate an OpenSSL private key with a different algorithm (DSA)
- openssl_privatekey: path=/etc/ssl/private/ansible.com.pem type=DSA - openssl_privatekey:
path: /etc/ssl/private/ansible.com.pem
type: DSA
''' '''
RETURN = ''' RETURN = '''

View file

@ -65,18 +65,21 @@ options:
EXAMPLES = ''' EXAMPLES = '''
# Generate an OpenSSL public key. # Generate an OpenSSL public key.
- openssl_publickey: path=/etc/ssl/public/ansible.com.pem - openssl_publickey:
privatekey_path=/etc/ssl/private/ansible.com.pem path: /etc/ssl/public/ansible.com.pem
privatekey_path: /etc/ssl/private/ansible.com.pem
# Force regenerate an OpenSSL public key if it already exists # Force regenerate an OpenSSL public key if it already exists
- openssl_publickey: path=/etc/ssl/public/ansible.com.pem - openssl_publickey:
privatekey_path=/etc/ssl/private/ansible.com.pem path: /etc/ssl/public/ansible.com.pem
force=True privatekey_path: /etc/ssl/private/ansible.com.pem
force: True
# Remove an OpenSSL public key # Remove an OpenSSL public key
- openssl_publickey: path=/etc/ssl/public/ansible.com.pem - openssl_publickey:
privatekey_path=/etc/ssl/private/ansible.com.pem path: /etc/ssl/public/ansible.com.pem
state=absent privatekey_path: /etc/ssl/private/ansible.com.pem
state: absent
''' '''
RETURN = ''' RETURN = '''