summaryrefslogtreecommitdiff
path: root/web_infrastructure
diff options
context:
space:
mode:
authorSam Doran <sdoran@ansible.com>2016-11-15 15:21:47 -0500
committerJohn R Barker <john@johnrbarker.com>2016-11-15 20:21:47 +0000
commit05e866e4d01e3b9c2893e0a3dbb053cb7311dcd1 (patch)
tree48c62747e974e56135ad404a9ae0344eabf4baef /web_infrastructure
parent109c68980424146121d79e4bc91cec475894645a (diff)
downloadansible-modules-core-05e866e4d01e3b9c2893e0a3dbb053cb7311dcd1.tar.gz
Examples syntax batch4 (#5620)
* Change example syntax on authorized_key module * Change example syntax on cron module * Change example syntax on group module * Change example syntax on hostname module * Change example syntax on seboolean module * Change example syntax on selinux module * Change example syntax on service module * Change example syntax on sysctl module * Change example syntax on systemd module * Change example syntax on user module * Change example syntax on debug module * Change example syntax on fail module * Change example syntax on include module * Change example syntax on include_role module * Change example syntax on include_vars module * Change example syntax on pause module * Change example syntax on wait_for module * Change example syntax on apache2_module module * > Change example syntax on django_manage module * Change example syntax on htpasswd module
Diffstat (limited to 'web_infrastructure')
-rw-r--r--web_infrastructure/apache2_module.py8
-rw-r--r--web_infrastructure/django_manage.py30
-rw-r--r--web_infrastructure/htpasswd.py21
3 files changed, 44 insertions, 15 deletions
diff --git a/web_infrastructure/apache2_module.py b/web_infrastructure/apache2_module.py
index 9f9df923..2e5060d3 100644
--- a/web_infrastructure/apache2_module.py
+++ b/web_infrastructure/apache2_module.py
@@ -47,10 +47,14 @@ requirements: ["a2enmod","a2dismod"]
EXAMPLES = '''
# enables the Apache2 module "wsgi"
-- apache2_module: state=present name=wsgi
+- apache2_module:
+ state: present
+ name: wsgi
# disables the Apache2 module "wsgi"
-- apache2_module: state=absent name=wsgi
+- apache2_module:
+ state: absent
+ name: wsgi
'''
import re
diff --git a/web_infrastructure/django_manage.py b/web_infrastructure/django_manage.py
index 3ce815dc..f334f398 100644
--- a/web_infrastructure/django_manage.py
+++ b/web_infrastructure/django_manage.py
@@ -99,24 +99,34 @@ author: "Scott Anderson (@tastychutney)"
EXAMPLES = """
# Run cleanup on the application installed in 'django_dir'.
-- django_manage: command=cleanup app_path={{ django_dir }}
+- django_manage:
+ command: cleanup
+ app_path: "{{ django_dir }}"
# Load the initial_data fixture into the application
-- django_manage: command=loaddata app_path={{ django_dir }} fixtures={{ initial_data }}
+- django_manage:
+ command: loaddata
+ app_path: "{{ django_dir }}"
+ fixtures: "{{ initial_data }}"
# Run syncdb on the application
-- django_manage: >
- command=syncdb
- app_path={{ django_dir }}
- settings={{ settings_app_name }}
- pythonpath={{ settings_dir }}
- virtualenv={{ virtualenv_dir }}
+- django_manage:
+ command: syncdb
+ app_path: "{{ django_dir }}"
+ settings: "{{ settings_app_name }}"
+ pythonpath: "{{ settings_dir }}"
+ virtualenv: "{{ virtualenv_dir }}"
# Run the SmokeTest test case from the main app. Useful for testing deploys.
-- django_manage: command=test app_path={{ django_dir }} apps=main.SmokeTest
+- django_manage:
+ command: test
+ app_path: "{{ django_dir }}"
+ apps: main.SmokeTest
# Create an initial superuser.
-- django_manage: command="createsuperuser --noinput --username=admin --email=admin@example.com" app_path={{ django_dir }}
+- django_manage:
+ command: "createsuperuser --noinput --username=admin --email=admin@example.com"
+ app_path: "{{ django_dir }}"
"""
diff --git a/web_infrastructure/htpasswd.py b/web_infrastructure/htpasswd.py
index f1a4e482..84a2cbdd 100644
--- a/web_infrastructure/htpasswd.py
+++ b/web_infrastructure/htpasswd.py
@@ -74,11 +74,26 @@ author: "Ansible Core Team"
EXAMPLES = """
# Add a user to a password file and ensure permissions are set
-- htpasswd: path=/etc/nginx/passwdfile name=janedoe password=9s36?;fyNp owner=root group=www-data mode=0640
+- htpasswd:
+ path: /etc/nginx/passwdfile
+ name: janedoe
+ password: '9s36?;fyNp'
+ owner: root
+ group: www-data
+ mode: 0640
+
# Remove a user from a password file
-- htpasswd: path=/etc/apache2/passwdfile name=foobar state=absent
+- htpasswd:
+ path: /etc/apache2/passwdfile
+ name: foobar
+ state: absent
+
# Add a user to a password file suitable for use by libpam-pwdfile
-- htpasswd: path=/etc/mail/passwords name=alex password=oedu2eGh crypt_scheme=md5_crypt
+- htpasswd:
+ path: /etc/mail/passwords
+ name: alex
+ password: oedu2eGh
+ crypt_scheme: md5_crypt
"""