Native YAML (#3596)

This commit is contained in:
Fabio Alessandro Locati 2016-12-01 12:30:04 +00:00 committed by Matt Clay
parent f4a4492992
commit 951b87492a
3 changed files with 64 additions and 16 deletions

View file

@ -72,30 +72,65 @@ options:
EXAMPLES = '''
# Set some settings in ~/.gitconfig
- git_config: name=alias.ci scope=global value=commit
- git_config: name=alias.st scope=global value=status
- git_config:
name: alias.ci
scope: global
value: commit
- git_config:
name: alias.st
scope: global
value: status
# Or system-wide:
- git_config: name=alias.remotev scope=system value="remote -v"
- git_config: name=core.editor scope=global value=vim
- git_config:
name: alias.remotev
scope: system
value: remote -v
- git_config:
name: core.editor
scope: global
value: vim
# scope=system is the default
- git_config: name=alias.diffc value="diff --cached"
- git_config: name=color.ui value=auto
- git_config:
name: alias.diffc
value: diff --cached
- git_config:
name: color.ui
value: auto
# Make etckeeper not complain when invoked by cron
- git_config: name=user.email repo=/etc scope=local value="root@{{ ansible_fqdn }}"
- git_config:
name: user.email
repo: /etc
scope: local
value: 'root@{{ ansible_fqdn }}'
# 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=alias.diffc
- git_config:
name: alias.ci
scope: global
# 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: list_all=yes scope=global
- git_config:
list_all: yes
scope: global
# When list_all=yes and no scope is specified, you get configuration from all scopes
- git_config: list_all=yes
- git_config:
list_all: yes
# Specify a repository to include local settings
- git_config: list_all=yes repo=/path/to/repo.git
- git_config:
list_all: yes
repo: /path/to/repo.git
'''
RETURN = '''