1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02: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

@ -58,63 +58,63 @@ notes:
''' '''
EXAMPLES = ''' EXAMPLES = '''
# Update repositories and install "foo" package - name: Update repositories and install foo package
- apk: apk:
name: foo name: foo
update_cache: yes update_cache: yes
# Update repositories and install "foo" and "bar" packages - name: Update repositories and install foo and bar packages
- apk: apk:
name: foo,bar name: foo,bar
update_cache: yes update_cache: yes
# Remove "foo" package - name: Remove foo package
- apk: apk:
name: foo name: foo
state: absent state: absent
# Remove "foo" and "bar" packages - name: Remove foo and bar packages
- apk: apk:
name: foo,bar name: foo,bar
state: absent state: absent
# Install the package "foo" - name: Install the package foo
- apk: apk:
name: foo name: foo
state: present state: present
# Install the packages "foo" and "bar" - name: Install the packages foo and bar
- apk: apk:
name: foo,bar name: foo,bar
state: present state: present
# Update repositories and update package "foo" to latest version - name: Update repositories and update package foo to latest version
- apk: apk:
name: foo name: foo
state: latest state: latest
update_cache: yes update_cache: yes
# Update repositories and update packages "foo" and "bar" to latest versions - name: Update repositories and update packages foo and bar to latest versions
- apk: apk:
name: foo,bar name: foo,bar
state: latest state: latest
update_cache: yes update_cache: yes
# Update all installed packages to the latest versions - name: Update all installed packages to the latest versions
- apk: apk:
upgrade: yes upgrade: yes
# Upgrade / replace / downgrade / uninstall all installed packages to the latest versions available - name: Upgrade / replace / downgrade / uninstall all installed packages to the latest versions available
- apk: apk:
available: yes available: yes
upgrade: yes upgrade: yes
# Update repositories as a separate step - name: Update repositories as a separate step
- apk: apk:
update_cache: yes update_cache: yes
# Install package from a specific repository - name: Install package from a specific repository
- apk: apk:
name: foo name: foo
state: latest state: latest
update_cache: yes update_cache: yes

View file

@ -49,18 +49,22 @@ requirements: [ homebrew ]
''' '''
EXAMPLES = ''' EXAMPLES = '''
- homebrew_tap: - name: Tap a Homebrew repository, state present
homebrew_tap:
name: homebrew/dupes name: homebrew/dupes
- homebrew_tap: - name: Tap a Homebrew repository, state absent
homebrew_tap:
name: homebrew/dupes name: homebrew/dupes
state: absent state: absent
- homebrew_tap: - name: Tap a Homebrew repository, state present
homebrew_tap:
name: homebrew/dupes,homebrew/science name: homebrew/dupes,homebrew/science
state: present state: present
- homebrew_tap: - name: Tap a Homebrew repository using url, state present
homebrew_tap:
name: telemachus/brew name: telemachus/brew
url: 'https://bitbucket.org/telemachus/brew' url: 'https://bitbucket.org/telemachus/brew'
''' '''

View file

@ -46,28 +46,28 @@ options:
''' '''
EXAMPLES = ''' EXAMPLES = '''
# Install the overlay 'mozilla' which is on the central overlays list. - name: Install the overlay mozilla which is on the central overlays list
- layman: layman:
name: mozilla name: mozilla
# Install the overlay 'cvut' from the specified alternative list. - name: Install the overlay cvut from the specified alternative list
- layman: layman:
name: cvut name: cvut
list_url: 'http://raw.github.com/cvut/gentoo-overlay/master/overlay.xml' list_url: 'http://raw.github.com/cvut/gentoo-overlay/master/overlay.xml'
# Update (sync) the overlay 'cvut', or install if not installed yet. - name: Update (sync) the overlay cvut or install if not installed yet
- layman: layman:
name: cvut name: cvut
list_url: 'http://raw.github.com/cvut/gentoo-overlay/master/overlay.xml' list_url: 'http://raw.github.com/cvut/gentoo-overlay/master/overlay.xml'
state: updated state: updated
# Update (sync) all of the installed overlays. - name: Update (sync) all of the installed overlays
- layman: layman:
name: ALL name: ALL
state: updated state: updated
# Uninstall the overlay 'cvut'. - name: Uninstall the overlay cvut
- layman: layman:
name: cvut name: cvut
state: absent state: absent
''' '''

View file

@ -53,24 +53,29 @@ requirements:
- python - python
''' '''
EXAMPLES = ''' EXAMPLES = '''
- opkg: - name: Install foo
opkg:
name: foo name: foo
state: present state: present
- opkg: - name: Update cache and install foo
opkg:
name: foo name: foo
state: present state: present
update_cache: yes update_cache: yes
- opkg: - name: Remove foo
opkg:
name: foo name: foo
state: absent state: absent
- opkg: - name: Remove foo and bar
opkg:
name: foo,bar name: foo,bar
state: absent state: absent
- opkg: - name: Install foo using overwrite option forcibly
opkg:
name: foo name: foo
state: present state: present
force: overwrite force: overwrite

View file

@ -48,14 +48,14 @@ options:
- Multiple values may be provided. - Multiple values may be provided.
''' '''
EXAMPLES = ''' EXAMPLES = '''
# Fetch packages for the solaris publisher direct from Oracle: - name: Fetch packages for the solaris publisher direct from Oracle
- pkg5_publisher: pkg5_publisher:
name: solaris name: solaris
sticky: true sticky: true
origin: https://pkg.oracle.com/solaris/support/ origin: https://pkg.oracle.com/solaris/support/
# Configure a publisher for locally-produced packages: - name: Configure a publisher for locally-produced packages
- pkg5_publisher: pkg5_publisher:
name: site name: site
origin: 'https://pkg.example.com/site/' origin: 'https://pkg.example.com/site/'
''' '''

View file

@ -68,45 +68,45 @@ options:
''' '''
EXAMPLES = ''' EXAMPLES = '''
# install package foo - name: Install package foo
- pkgin: pkgin:
name: foo name: foo
state: present state: present
# Update database and install "foo" package - name: Update cache and install foo package
- pkgin: pkgin:
name: foo name: foo
update_cache: yes update_cache: yes
# remove package foo - name: Remove package foo
- pkgin: pkgin:
name: foo name: foo
state: absent state: absent
# remove packages foo and bar - name: Remove packages foo and bar
- pkgin: pkgin:
name: foo,bar name: foo,bar
state: absent state: absent
# Update repositories as a separate step - name: Update repositories as a separate step
- pkgin: pkgin:
update_cache: yes update_cache: yes
# Upgrade main packages (equivalent to C(pkgin upgrade)) - name: Upgrade main packages (equivalent to pkgin upgrade)
- pkgin: pkgin:
upgrade: yes upgrade: yes
# Upgrade all packages (equivalent to C(pkgin full-upgrade)) - name: Upgrade all packages (equivalent to pkgin full-upgrade)
- pkgin: pkgin:
full_upgrade: yes full_upgrade: yes
# Force-upgrade all packages (equivalent to C(pkgin -F full-upgrade)) - name: Force-upgrade all packages (equivalent to pkgin -F full-upgrade)
- pkgin: pkgin:
full_upgrade: yes full_upgrade: yes
force: yes force: yes
# clean packages cache (equivalent to C(pkgin clean)) - name: Clean packages cache (equivalent to pkgin clean)
- pkgin: pkgin:
clean: yes clean: yes
''' '''

View file

@ -48,13 +48,13 @@ options:
''' '''
EXAMPLES = ''' EXAMPLES = '''
# Install a package - name: Install a package
- pkgutil: pkgutil:
name: CSWcommon name: CSWcommon
state: present state: present
# Install a package from a specific repository - name: Install a package from a specific repository
- pkgutil: pkgutil:
name: CSWnrpe name: CSWnrpe
site: 'ftp://myinternal.repo/opencsw/kiel' site: 'ftp://myinternal.repo/opencsw/kiel'
state: latest state: latest

View file

@ -164,44 +164,44 @@ author:
''' '''
EXAMPLES = ''' EXAMPLES = '''
# Make sure package foo is installed - name: Make sure package foo is installed
- portage: portage:
package: foo package: foo
state: present state: present
# Make sure package foo is not installed - name: Make sure package foo is not installed
- portage: portage:
package: foo package: foo
state: absent state: absent
# Update package foo to the "latest" version ( os specific alternative to latest ) - name: Update package foo to the latest version (os specific alternative to latest)
- portage: portage:
package: foo package: foo
update: yes update: yes
# Install package foo using PORTAGE_BINHOST setup - name: Install package foo using PORTAGE_BINHOST setup
- portage: portage:
package: foo package: foo
getbinpkg: yes getbinpkg: yes
# Re-install world from binary packages only and do not allow any compiling - name: Re-install world from binary packages only and do not allow any compiling
- portage: portage:
package: '@world' package: '@world'
usepkgonly: yes usepkgonly: yes
# Sync repositories and update world - name: Sync repositories and update world
- portage: portage:
package: '@world' package: '@world'
update: yes update: yes
deep: yes deep: yes
sync: yes sync: yes
# Remove unneeded packages - name: Remove unneeded packages
- portage: portage:
depclean: yes depclean: yes
# Remove package foo if it is not explicitly needed - name: Remove package foo if it is not explicitly needed
- portage: portage:
package: foo package: foo
state: absent state: absent
depclean: yes depclean: yes

View file

@ -38,18 +38,18 @@ author: "berenddeboer (@berenddeboer)"
''' '''
EXAMPLES = ''' EXAMPLES = '''
# Install package foo - name: Install package foo
- portinstall: portinstall:
name: foo name: foo
state: present state: present
# Install package security/cyrus-sasl2-saslauthd - name: Install package security/cyrus-sasl2-saslauthd
- portinstall: portinstall:
name: security/cyrus-sasl2-saslauthd name: security/cyrus-sasl2-saslauthd
state: present state: present
# Remove packages foo and bar - name: Remove packages foo and bar
- portinstall: portinstall:
name: foo,bar name: foo,bar
state: absent state: absent
''' '''

View file

@ -53,7 +53,8 @@ options:
''' '''
EXAMPLES = ''' EXAMPLES = '''
- rhn_channel: - name: Add a Red Hat software channel
rhn_channel:
name: rhel-x86_64-server-v2vwin-6 name: rhel-x86_64-server-v2vwin-6
sysname: server01 sysname: server01
url: https://rhn.redhat.com/rpc/api url: https://rhn.redhat.com/rpc/api

View file

@ -46,18 +46,18 @@ requirements: [ "Slackware >= 12.2" ]
''' '''
EXAMPLES = ''' EXAMPLES = '''
# Install package foo - name: Install package foo
- slackpkg: slackpkg:
name: foo name: foo
state: present state: present
# Remove packages foo and bar - name: Remove packages foo and bar
- slackpkg: slackpkg:
name: foo,bar name: foo,bar
state: absent state: absent
# Make sure that it is the most updated package - name: Make sure that it is the most updated package
- slackpkg: slackpkg:
name: foo name: foo
state: latest state: latest
''' '''

View file

@ -74,36 +74,36 @@ options:
EXAMPLES = ''' EXAMPLES = '''
# Make sure spell 'foo' is installed - name: Make sure spell foo is installed
- sorcery: sorcery:
spell: foo spell: foo
state: present state: present
# Make sure spells 'foo', 'bar' and 'baz' are removed - name: Make sure spells foo, bar and baz are removed
- sorcery: sorcery:
spell: foo,bar,baz spell: foo,bar,baz
state: absent state: absent
# Make sure spell 'foo' with dependencies 'bar' and 'baz' is installed - name: Make sure spell foo with dependencies bar and baz is installed
- sorcery: sorcery:
spell: foo spell: foo
depends: bar,baz depends: bar,baz
state: present state: present
# Make sure spell 'foo' with 'bar' and without 'baz' dependencies is installed - name: Make sure spell foo with bar and without baz dependencies is installed
- sorcery: sorcery:
spell: foo spell: foo
depends: +bar,-baz depends: +bar,-baz
state: present state: present
# Make sure spell 'foo' with libressl (providing SSL) dependency is installed - name: Make sure spell foo with libressl (providing SSL) dependency is installed
- sorcery: sorcery:
spell: foo spell: foo
depends: libressl(SSL) depends: libressl(SSL)
state: present state: present
# Playbook: make sure spells with/without required dependencies (if any) are installed - name: Make sure spells with/without required dependencies (if any) are installed
- sorcery: sorcery:
name: "{{ item.spell }}" name: "{{ item.spell }}"
depends: "{{ item.depends | default(None) }}" depends: "{{ item.depends | default(None) }}"
state: present state: present
@ -112,30 +112,30 @@ EXAMPLES = '''
- { spell: 'fwknop', depends: 'gpgme' } - { spell: 'fwknop', depends: 'gpgme' }
- { spell: 'pv,tnftp,tor' } - { spell: 'pv,tnftp,tor' }
# Install the latest version of spell 'foo' using regular glossary - name: Install the latest version of spell foo using regular glossary
- sorcery: sorcery:
name: foo name: foo
state: latest state: latest
# Rebuild spell 'foo' - name: Rebuild spell foo
- sorcery: sorcery:
spell: foo spell: foo
state: rebuild state: rebuild
# Rebuild the whole system, but update Sorcery and Codex first - name: Rebuild the whole system, but update Sorcery and Codex first
- sorcery: sorcery:
spell: '*' spell: '*'
state: rebuild state: rebuild
update: yes update: yes
update_cache: yes update_cache: yes
# Refresh the grimoire collection if it's 1 day old using native sorcerous alias - name: Refresh the grimoire collection if it is 1 day old using native sorcerous alias
- sorcery: sorcery:
update_codex: yes update_codex: yes
cache_valid_time: 86400 cache_valid_time: 86400
# Update only Sorcery itself - name: Update only Sorcery itself
- sorcery: sorcery:
update: yes update: yes
''' '''

View file

@ -61,33 +61,33 @@ options:
''' '''
EXAMPLES = ''' EXAMPLES = '''
# Install a package from an already copied file - name: Install a package from an already copied file
- svr4pkg: svr4pkg:
name: CSWcommon name: CSWcommon
src: /tmp/cswpkgs.pkg src: /tmp/cswpkgs.pkg
state: present state: present
# Install a package directly from an http site - name: Install a package directly from an http site
- svr4pkg: svr4pkg:
name: CSWpkgutil name: CSWpkgutil
src: 'http://get.opencsw.org/now' src: 'http://get.opencsw.org/now'
state: present state: present
zone: current zone: current
# Install a package with a response file - name: Install a package with a response file
- svr4pkg: svr4pkg:
name: CSWggrep name: CSWggrep
src: /tmp/third-party.pkg src: /tmp/third-party.pkg
response_file: /tmp/ggrep.response response_file: /tmp/ggrep.response
state: present state: present
# Ensure that a package is not installed. - name: Ensure that a package is not installed
- svr4pkg: svr4pkg:
name: SUNWgnome-sound-recorder name: SUNWgnome-sound-recorder
state: absent state: absent
# Ensure that a category is not installed. - name: Ensure that a category is not installed
- svr4pkg: svr4pkg:
name: FIREFOX name: FIREFOX
state: absent state: absent
category: true category: true

View file

@ -35,17 +35,20 @@ options:
''' '''
EXAMPLES = ''' EXAMPLES = '''
- swdepot: - name: Install a package
swdepot:
name: unzip-6.0 name: unzip-6.0
state: present state: present
depot: 'repository:/path' depot: 'repository:/path'
- swdepot: - name: Install the latest version of a package
swdepot:
name: unzip name: unzip
state: latest state: latest
depot: 'repository:/path' depot: 'repository:/path'
- swdepot: - name: Remove a package
swdepot:
name: unzip name: unzip
state: absent state: absent
''' '''

View file

@ -46,8 +46,8 @@ notes:
''' '''
EXAMPLES = r''' EXAMPLES = r'''
# Task to gather facts from a HP iLO interface only if the system is an HP server - name: Gather facts from a HP iLO interface only if the system is an HP server
- hpilo_info: hpilo_info:
host: YOUR_ILO_ADDRESS host: YOUR_ILO_ADDRESS
login: YOUR_ILO_LOGIN login: YOUR_ILO_LOGIN
password: YOUR_ILO_PASSWORD password: YOUR_ILO_PASSWORD

View file

@ -88,15 +88,15 @@ uefimode:
''' '''
EXAMPLES = ''' EXAMPLES = '''
# Ensure bootdevice is HD. - name: Ensure bootdevice is HD
- ipmi_boot: ipmi_boot:
name: test.testdomain.com name: test.testdomain.com
user: admin user: admin
password: password password: password
bootdev: hd bootdev: hd
# Ensure bootdevice is not Network - name: Ensure bootdevice is not Network
- ipmi_boot: ipmi_boot:
name: test.testdomain.com name: test.testdomain.com
user: admin user: admin
password: password password: password

View file

@ -60,8 +60,8 @@ powerstate:
''' '''
EXAMPLES = ''' EXAMPLES = '''
# Ensure machine is powered on. - name: Ensure machine is powered on
- ipmi_power: ipmi_power:
name: test.testdomain.com name: test.testdomain.com
user: admin user: admin
password: password password: password

View file

@ -45,8 +45,8 @@ options:
''' '''
EXAMPLES = ''' EXAMPLES = '''
# Example bzr checkout from Ansible Playbooks - name: Checkout
- bzr: bzr:
name: bzr+ssh://foosball.example.org/path/to/branch name: bzr+ssh://foosball.example.org/path/to/branch
dest: /srv/checkout dest: /srv/checkout
version: 22 version: 22

View file

@ -59,70 +59,73 @@ options:
''' '''
EXAMPLES = ''' EXAMPLES = '''
# Set some settings in ~/.gitconfig - name: Add a setting to ~/.gitconfig
- git_config: git_config:
name: alias.ci name: alias.ci
scope: global scope: global
value: commit value: commit
- git_config: - name: Add a setting to ~/.gitconfig
git_config:
name: alias.st name: alias.st
scope: global scope: global
value: status value: status
# Unset some settings in ~/.gitconfig - name: Remove a setting from ~/.gitconfig
- git_config: git_config:
name: alias.ci name: alias.ci
scope: global scope: global
state: absent state: absent
# Or system-wide: - name: Add a setting to ~/.gitconfig
- git_config: git_config:
name: alias.remotev
scope: system
value: remote -v
- git_config:
name: core.editor name: core.editor
scope: global scope: global
value: vim value: vim
# scope=system is the default - name: Add a setting system-wide
- git_config: git_config:
name: alias.remotev
scope: system
value: remote -v
- name: Add a setting to a system scope (default)
git_config:
name: alias.diffc name: alias.diffc
value: diff --cached value: diff --cached
- git_config: - name: Add a setting to a system scope (default)
git_config:
name: color.ui name: color.ui
value: auto value: auto
# Make etckeeper not complain when invoked by cron - name: Make etckeeper not complaining when it is invoked by cron
- git_config: git_config:
name: user.email name: user.email
repo: /etc repo: /etc
scope: local scope: local
value: 'root@{{ ansible_fqdn }}' value: 'root@{{ ansible_fqdn }}'
# Read individual values from git config - name: Read individual values from git config
- git_config: git_config:
name: alias.ci name: alias.ci
scope: global scope: global
# scope: system is also assumed when reading values, unless list_all=yes - name: Scope system is also assumed when reading values, unless list_all=yes
- git_config: git_config:
name: alias.diffc name: alias.diffc
# Read all values from git config - name: Read all values from git config
- git_config: git_config:
list_all: yes list_all: yes
scope: global scope: global
# When list_all=yes and no scope is specified, you get configuration from all scopes - name: When list_all is yes and no scope is specified, you get configuration from all scopes
- git_config: git_config:
list_all: yes list_all: yes
# Specify a repository to include local settings - name: Specify a repository to include local settings
- git_config: git_config:
list_all: yes list_all: yes
repo: /path/to/repo.git repo: /path/to/repo.git
''' '''

View file

@ -75,8 +75,8 @@ notes:
''' '''
EXAMPLES = ''' EXAMPLES = '''
# add a new read-only deploy key to a GitHub repository using basic authentication - name: Add a new read-only deploy key to a GitHub repository using basic authentication
- github_deploy_key: github_deploy_key:
owner: "johndoe" owner: "johndoe"
repo: "example" repo: "example"
name: "new-deploy-key" name: "new-deploy-key"
@ -85,8 +85,8 @@ EXAMPLES = '''
username: "johndoe" username: "johndoe"
password: "supersecretpassword" password: "supersecretpassword"
# remove an existing deploy key from a GitHub repository - name: Remove an existing deploy key from a GitHub repository
- github_deploy_key: github_deploy_key:
owner: "johndoe" owner: "johndoe"
repository: "example" repository: "example"
name: "new-deploy-key" name: "new-deploy-key"
@ -96,8 +96,8 @@ EXAMPLES = '''
password: "supersecretpassword" password: "supersecretpassword"
state: absent state: absent
# add a new deploy key to a GitHub repository, replace an existing key, use an OAuth2 token to authenticate - name: Add a new deploy key to a GitHub repository, replace an existing key, use an OAuth2 token to authenticate
- github_deploy_key: github_deploy_key:
owner: "johndoe" owner: "johndoe"
repository: "example" repository: "example"
name: "new-deploy-key" name: "new-deploy-key"
@ -105,8 +105,8 @@ EXAMPLES = '''
force: yes force: yes
token: "ABAQDAwXxn7kIMNWzcDfo..." token: "ABAQDAwXxn7kIMNWzcDfo..."
# re-add a deploy key to a GitHub repository but with a different name - name: Re-add a deploy key to a GitHub repository but with a different name
- github_deploy_key: github_deploy_key:
owner: "johndoe" owner: "johndoe"
repository: "example" repository: "example"
name: "replace-deploy-key" name: "replace-deploy-key"
@ -114,8 +114,8 @@ EXAMPLES = '''
username: "johndoe" username: "johndoe"
password: "supersecretpassword" password: "supersecretpassword"
# add a new deploy key to a GitHub repository using 2FA - name: Add a new deploy key to a GitHub repository using 2FA
- github_deploy_key: github_deploy_key:
owner: "johndoe" owner: "johndoe"
repo: "example" repo: "example"
name: "new-deploy-key-2" name: "new-deploy-key-2"
@ -124,8 +124,8 @@ EXAMPLES = '''
password: "supersecretpassword" password: "supersecretpassword"
otp: 123456 otp: 123456
# add a read-only deploy key to a repository hosted on GitHub Enterprise - name: Add a read-only deploy key to a repository hosted on GitHub Enterprise
- github_deploy_key: github_deploy_key:
github_url: "https://api.example.com" github_url: "https://api.example.com"
owner: "janedoe" owner: "janedoe"
repo: "example" repo: "example"

View file

@ -60,17 +60,18 @@ author: "Phillip Gentry, CX Inc (@pcgentry)"
''' '''
EXAMPLES = ''' EXAMPLES = '''
# Example creating a new service hook. It ignores duplicates. - name: Create a new service hook ignoring duplicates
- github_hooks: github_hooks:
action: create action: create
hookurl: http://11.111.111.111:2222 hookurl: http://11.111.111.111:2222
user: '{{ gituser }}' user: '{{ gituser }}'
oauthkey: '{{ oauthkey }}' oauthkey: '{{ oauthkey }}'
repo: https://api.github.com/repos/pcgentry/Github-Auto-Deploy repo: https://api.github.com/repos/pcgentry/Github-Auto-Deploy
# Cleaning all hooks for this repo that had an error on the last update. Since this works for all hooks in a repo it is probably best that this would # Cleaning all hooks for this repo that had an error on the last update.
# be called from a handler. # Since this works for all hooks in a repo it is probably best that this would be called from a handler.
- github_hooks: - name: Clean all hooks
github_hooks:
action: cleanall action: cleanall
user: '{{ gituser }}' user: '{{ gituser }}'
oauthkey: '{{ oauthkey }}' oauthkey: '{{ oauthkey }}'

View file

@ -92,31 +92,31 @@ extends_documentation_fragment:
EXAMPLES = r''' EXAMPLES = r'''
- name: Create CPG sample_cpg - name: Create CPG sample_cpg
ss_3par_cpg: ss_3par_cpg:
storage_system_ip: 10.10.10.1 storage_system_ip: 10.10.10.1
storage_system_username: username storage_system_username: username
storage_system_password: password storage_system_password: password
state: present state: present
cpg_name: sample_cpg cpg_name: sample_cpg
domain: sample_domain domain: sample_domain
growth_increment: 32000 MiB growth_increment: 32000 MiB
growth_limit: 64000 MiB growth_limit: 64000 MiB
growth_warning: 48000 MiB growth_warning: 48000 MiB
raid_type: R6 raid_type: R6
set_size: 8 set_size: 8
high_availability: MAG high_availability: MAG
disk_type: FC disk_type: FC
secure: no secure: no
- name: Delete CPG sample_cpg - name: Delete CPG sample_cpg
ss_3par_cpg: ss_3par_cpg:
storage_system_ip: 10.10.10.1 storage_system_ip: 10.10.10.1
storage_system_username: username storage_system_username: username
storage_system_password: password storage_system_password: password
state: absent state: absent
cpg_name: sample_cpg cpg_name: sample_cpg
secure: no secure: no
''' '''
RETURN = r''' RETURN = r'''

View file

@ -42,23 +42,23 @@ requirements:
''' '''
EXAMPLES = ''' EXAMPLES = '''
# Example action to start service httpd, if not running - name: Start service httpd, if not running
- openwrt_init: openwrt_init:
state: started state: started
name: httpd name: httpd
# Example action to stop service cron, if running - name: Stop service cron, if running
- openwrt_init: openwrt_init:
name: cron name: cron
state: stopped state: stopped
# Example action to reload service httpd, in all cases - name: Reload service httpd, in all cases
- openwrt_init: openwrt_init:
name: httpd name: httpd
state: reloaded state: reloaded
# Example action to enable service httpd - name: Enable service httpd
- openwrt_init: openwrt_init:
name: httpd name: httpd
enabled: yes enabled: yes
''' '''

View file

@ -70,6 +70,8 @@ notes:
''' '''
EXAMPLES = r''' EXAMPLES = r'''
# TODO: Describe what happens in each example
- osx_defaults: - osx_defaults:
domain: com.apple.Safari domain: com.apple.Safari
key: IncludeInternalDebugMenu key: IncludeInternalDebugMenu

View file

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

View file

@ -49,26 +49,30 @@ requirements: ["a2enmod","a2dismod"]
''' '''
EXAMPLES = ''' EXAMPLES = '''
# enables the Apache2 module "wsgi" - name: Enable the Apache2 module wsgi
- apache2_module: apache2_module:
state: present state: present
name: wsgi name: wsgi
# disables the Apache2 module "wsgi"
- apache2_module: - name: Disables the Apache2 module wsgi
apache2_module:
state: absent state: absent
name: wsgi name: wsgi
# disable default modules for Debian
- apache2_module: - name: Disable default modules for Debian
apache2_module:
state: absent state: absent
name: autoindex name: autoindex
force: True 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 state: absent
name: mpm_worker name: mpm_worker
ignore_configcheck: True 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 state: present
name: dump_io name: dump_io
identifier: dumpio_module identifier: dumpio_module

View file

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

View file

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

View file

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

View file

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