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
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

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

View file

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

View file

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

View file

@ -60,17 +60,18 @@ author: "Phillip Gentry, CX Inc (@pcgentry)"
'''
EXAMPLES = '''
# Example creating a new service hook. It ignores duplicates.
- github_hooks:
- name: Create a new service hook ignoring duplicates
github_hooks:
action: create
hookurl: http://11.111.111.111:2222
user: '{{ gituser }}'
oauthkey: '{{ oauthkey }}'
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
# be called from a handler.
- github_hooks:
# 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 be called from a handler.
- name: Clean all hooks
github_hooks:
action: cleanall
user: '{{ gituser }}'
oauthkey: '{{ oauthkey }}'