PARALLAX

git_config

Add, replace, or remove Git configuration values

Collection: community.general

Full Name: community.general.git_config

Synopsis

Add, replace, or remove Git configuration values

Parameters

NameTypeRequiredDefaultDescription
namestringyesConfiguration setting to manage
repostringRepository directory; required for local scope
filestringConfiguration file; required for file scope
scopestringsystemConfiguration scope: system, global, local, or file
statestringpresentWhether the setting should be present or absent
valuestringNonempty configuration value required when state is present
add_modestringreplace-allUse replace-all to replace values or add to preserve other values

Example

yaml
- name: Configure a repository's author email
  community.general.git_config:
    scope: local
    repo: /srv/project
    name: user.email
    value: automation@example.org
Search
    ↑ ↓ move↵ openesc close