1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-04-13 15:35:08 +00:00

Fix Ansible documentation in part of example formatting. Part 2 (#333)

* Fix Ansible documentation in part of example formatting

* fix

* Revert osx_defaults.py
This commit is contained in:
Andrew Klychkov 2020-05-15 13:27:06 +03:00 committed by GitHub
parent 328319b926
commit 327832dcbb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 299 additions and 268 deletions

View file

@ -54,38 +54,46 @@ options:
'''
EXAMPLES = '''
# Get all current balancer pool members' attributes:
- apache2_mod_proxy:
- name: Get all current balancer pool members attributes
apache2_mod_proxy:
balancer_vhost: 10.0.0.2
# Get a specific member's attributes:
- apache2_mod_proxy:
- name: Get a specific member attributes
apache2_mod_proxy:
balancer_vhost: myws.mydomain.org
balancer_suffix: /lb/
member_host: node1.myws.mydomain.org
# Enable all balancer pool members:
- apache2_mod_proxy:
- name: Get attributes
apache2_mod_proxy:
balancer_vhost: '{{ myloadbalancer_host }}'
register: result
- apache2_mod_proxy:
- name: Enable all balancer pool members
apache2_mod_proxy:
balancer_vhost: '{{ myloadbalancer_host }}'
member_host: '{{ item.host }}'
state: present
with_items: '{{ result.members }}'
# Gracefully disable a member from a loadbalancer node:
- apache2_mod_proxy:
- name: Step 1
apache2_mod_proxy:
balancer_vhost: '{{ vhost_host }}'
member_host: '{{ member.host }}'
state: drained
delegate_to: myloadbalancernode
- wait_for:
- name: Step 2
wait_for:
host: '{{ member.host }}'
port: '{{ member.port }}'
state: drained
delegate_to: myloadbalancernode
- apache2_mod_proxy:
- name: Step 3
apache2_mod_proxy:
balancer_vhost: '{{ vhost_host }}'
member_host: '{{ member.host }}'
state: absent

View file

@ -49,26 +49,30 @@ requirements: ["a2enmod","a2dismod"]
'''
EXAMPLES = '''
# enables the Apache2 module "wsgi"
- apache2_module:
- name: Enable the Apache2 module wsgi
apache2_module:
state: present
name: wsgi
# disables the Apache2 module "wsgi"
- apache2_module:
- name: Disables the Apache2 module wsgi
apache2_module:
state: absent
name: wsgi
# disable default modules for Debian
- apache2_module:
- name: Disable default modules for Debian
apache2_module:
state: absent
name: autoindex
force: True
# disable mpm_worker and ignore warnings about missing mpm module
- apache2_module:
- name: Disable mpm_worker and ignore warnings about missing mpm module
apache2_module:
state: absent
name: mpm_worker
ignore_configcheck: True
# enable dump_io module, which is identified as dumpio_module inside apache2
- apache2_module:
- name: Enable dump_io module, which is identified as dumpio_module inside apache2
apache2_module:
state: present
name: dump_io
identifier: dumpio_module

View file

@ -97,33 +97,33 @@ author: "Scott Anderson (@tastychutney)"
'''
EXAMPLES = """
# Run cleanup on the application installed in 'django_dir'.
- django_manage:
- name: Run cleanup on the application installed in django_dir
django_manage:
command: cleanup
app_path: "{{ django_dir }}"
# Load the initial_data fixture into the application
- django_manage:
- name: Load the initial_data fixture into the application
django_manage:
command: loaddata
app_path: "{{ django_dir }}"
fixtures: "{{ initial_data }}"
# Run syncdb on the application
- django_manage:
- name: Run syncdb on the application
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:
- name: Run the SmokeTest test case from the main app. Useful for testing deploys
django_manage:
command: test
app_path: "{{ django_dir }}"
apps: main.SmokeTest
# Create an initial superuser.
- django_manage:
- name: Create an initial superuser
django_manage:
command: "createsuperuser --noinput --username=admin --email=admin@example.com"
app_path: "{{ django_dir }}"
"""

View file

@ -63,8 +63,8 @@ extends_documentation_fragment: files
'''
EXAMPLES = """
# Add a user to a password file and ensure permissions are set
- htpasswd:
- name: Add a user to a password file and ensure permissions are set
htpasswd:
path: /etc/nginx/passwdfile
name: janedoe
password: '9s36?;fyNp'
@ -72,14 +72,14 @@ EXAMPLES = """
group: www-data
mode: 0640
# Remove a user from a password file
- htpasswd:
- name: Remove a user from a password file
htpasswd:
path: /etc/apache2/passwdfile
name: foobar
state: absent
# Add a user to a password file suitable for use by libpam-pwdfile
- htpasswd:
- name: Add a user to a password file suitable for use by libpam-pwdfile
htpasswd:
path: /etc/mail/passwords
name: alex
password: oedu2eGh

View file

@ -55,32 +55,32 @@ author:
'''
EXAMPLES = '''
# Manage the state of program to be in 'started' state.
- supervisorctl:
- name: Manage the state of program to be in started state
supervisorctl:
name: my_app
state: started
# Manage the state of program group to be in 'started' state.
- supervisorctl:
- name: Manage the state of program group to be in started state
supervisorctl:
name: 'my_apps:'
state: started
# Restart my_app, reading supervisorctl configuration from a specified file.
- supervisorctl:
- name: Restart my_app, reading supervisorctl configuration from a specified file
supervisorctl:
name: my_app
state: restarted
config: /var/opt/my_project/supervisord.conf
# Restart my_app, connecting to supervisord with credentials and server URL.
- supervisorctl:
- name: Restart my_app, connecting to supervisord with credentials and server URL
supervisorctl:
name: my_app
state: restarted
username: test
password: testpass
server_url: http://localhost:9001
# Send a signal to my_app via supervisorctl
- supervisorctl:
- name: Send a signal to my_app via supervisorctl
supervisorctl:
name: my_app
state: signalled
signal: USR1

View file

@ -72,8 +72,8 @@ notes:
'''
EXAMPLES = '''
# Create an issue in the my hosted Taiga environment and attach an error log
- taiga_issue:
- name: Create an issue in the my hosted Taiga environment and attach an error log
taiga_issue:
taiga_host: https://mytaigahost.example.com
project: myproject
subject: An error has been found
@ -89,8 +89,8 @@ EXAMPLES = '''
- Needs manual check
state: present
# Deletes the previously created issue
- taiga_issue:
- name: Deletes the previously created issue
taiga_issue:
taiga_host: https://mytaigahost.example.com
project: myproject
subject: An error has been found