Anons79 Mini Shell

Directory : /proc/self/root/lib/python2.7/site-packages/ansible/modules/source_control/
Upload File :
Current File : //proc/self/root/lib/python2.7/site-packages/ansible/modules/source_control/git_config.pyo

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZddlm
Z
d
�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	communitytsupported_bys�
---
module: git_config
author:
  - Matthew Gamble (@djmattyg007)
  - Marius Gedminas (@mgedmin)
version_added: 2.1
requirements: ['git']
short_description: Read and write git configuration
description:
  - The C(git_config) module changes git configuration by invoking 'git config'.
    This is needed if you don't want to use M(template) for the entire git
    config file (e.g. because you need to change just C(user.email) in
    /etc/.git/config).  Solutions involving M(command) are cumbersome or
    don't work correctly in check mode.
options:
  list_all:
    description:
      - List all settings (optionally limited to a given I(scope))
    type: bool
    default: 'no'
  name:
    description:
      - The name of the setting. If no value is supplied, the value will
        be read from the config if it has been set.
  repo:
    description:
      - Path to a git repository for reading and writing values from a
        specific repo.
  scope:
    description:
      - Specify which scope to read/set values from. This is required
        when setting config values. If this is set to local, you must
        also specify the repo parameter. It defaults to system only when
        not using I(list_all)=yes.
    choices: [ "local", "global", "system" ]
  state:
    description:
      - "Indicates the setting should be set/unset.
        This parameter has higher precedence than I(value) parameter:
        when I(state)=absent and I(value) is defined, I(value) is discarded."
    choices: [ 'present', 'absent' ]
    default: 'present'
    version_added: '2.8'
  value:
    description:
      - When specifying the name of a single setting, supply a value to
        set that setting to the given value.
s�
# Set some settings in ~/.gitconfig
- git_config:
    name: alias.ci
    scope: global
    value: commit

- git_config:
    name: alias.st
    scope: global
    value: status

# Unset some settings in ~/.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: 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

# Make etckeeper not complain when 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: 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

# When list_all=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:
    list_all: yes
    repo: /path/to/repo.git
s�
---
config_value:
  description: When list_all=no and value is not set, a string containing the value of the setting in name
  returned: success
  type: str
  sample: "vim"

config_values:
  description: When list_all=yes, a dict containing key/value pairs of multiple configuration settings
  returned: success
  type: dict
  sample:
    core.editor: "vim"
    color.ui: "auto"
    alias.diffc: "diff --cached"
    alias.remotev: "remote -v"
(t
AnsibleModule(tshlex_quotecC`s�tdtdtdtdddt�dtdd�d	tdd
�dtdtdddd
ddg�dtdtdddddddg�dtdt��dddgddgddggddd
d	gfgdddggdt�}|jdt�}|j}tdddddddd�|_|drF|d}nd}|drc|d}n|drvd}nd}|ddkr�d}d|d<nd}|dr�|d}nd}|dd g}|dr�|jd!�n|r|jd"|�n|r|j|�n|d
kr4|d	}n'|drU|d	rU|d	}nd#}|j	d$j
|�d%|�\}	}
}|dr�|r�|	d&kr�d'|kr�|jd(td)d*d+i�n4|	d,kr�|jd-|	d)|d.d$j
|��n|drq|
j
�j�}i}
x0|D](}|jd/d0�\}}||
|<q&W|jd(td)d*d+|
�n�|r�|r�|jd(td)d*d1|
j
��nW|r�|
r�|jd(td)d2�n1|
j
�}||kr�|jd(td)d*�n|js�|r:|jt|�d0d"|�d$j
|�}n"t|�}d$j
||g�}|j	|d%|�\}	}
}|r�|jd-|	d)|d.|�q�n|jd)d3d4td5d$j
|�d6|d7d8d$j
|�d9|p�d*d7�d(t�dS(:Nt
argument_spectlist_alltrequiredttypetbooltdefaulttnametstrtrepotpathtscopetchoicestlocaltglobaltsystemtstatetpresenttabsenttvaluetmutually_exclusivetrequired_iftrequired_one_oftsupports_check_modetgittLANGtCtLC_ALLtLC_MESSAGEStLC_CTYPEtunsettconfigs
--includess-ls--t/t tcwdi�sunable to read config filetchangedtmsgtt
config_valuesitrctcmdt=itconfig_valuesno setting to unsetssetting changedtdifft
before_headertbefores
tafter_headertafter(RtdicttFalsetTruetget_bin_pathtparamstrun_command_environ_updatetNonetappendtrun_commandtjoint	exit_jsont	fail_jsontrstript
splitlinestsplitt
check_modetinserttlenR	(tmoduletgit_pathR=RRR't	new_valuetargstdirR0toutterrtvaluesR/Rtktvt	old_valueR1tnew_value_quoted((sM/usr/lib/python2.7/site-packages/ansible/modules/source_control/git_config.pytmain�s�$'!		$




	





'((

%
	"	
t__main__N(t
__future__RRRR
t
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicRtansible.module_utils.six.movesR	RWt__name__(((sM/usr/lib/python2.7/site-packages/ansible/modules/source_control/git_config.pyt<module>	s


3E	m

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]