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 = '''
# Update repositories and install "foo" package
- apk:
- name: Update repositories and install foo package
apk:
name: foo
update_cache: yes
# Update repositories and install "foo" and "bar" packages
- apk:
- name: Update repositories and install foo and bar packages
apk:
name: foo,bar
update_cache: yes
# Remove "foo" package
- apk:
- name: Remove foo package
apk:
name: foo
state: absent
# Remove "foo" and "bar" packages
- apk:
- name: Remove foo and bar packages
apk:
name: foo,bar
state: absent
# Install the package "foo"
- apk:
- name: Install the package foo
apk:
name: foo
state: present
# Install the packages "foo" and "bar"
- apk:
- name: Install the packages foo and bar
apk:
name: foo,bar
state: present
# Update repositories and update package "foo" to latest version
- apk:
- name: Update repositories and update package foo to latest version
apk:
name: foo
state: latest
update_cache: yes
# Update repositories and update packages "foo" and "bar" to latest versions
- apk:
- name: Update repositories and update packages foo and bar to latest versions
apk:
name: foo,bar
state: latest
update_cache: yes
# Update all installed packages to the latest versions
- apk:
- name: Update all installed packages to the latest versions
apk:
upgrade: yes
# Upgrade / replace / downgrade / uninstall all installed packages to the latest versions available
- apk:
- name: Upgrade / replace / downgrade / uninstall all installed packages to the latest versions available
apk:
available: yes
upgrade: yes
# Update repositories as a separate step
- apk:
- name: Update repositories as a separate step
apk:
update_cache: yes
# Install package from a specific repository
- apk:
- name: Install package from a specific repository
apk:
name: foo
state: latest
update_cache: yes

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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