mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Add state option to git_config module (#50578)
* Add state option to git_config module State present/absent option works like --set/--unset option for 'git config'. * Change git_config to avoid useless parameter passed to git command When unsetting value, command was : git config --unset foo ''. Now command is : git config --unset foo. * Add some integration tests to git_config module * Add missing aliases file * Change set up method Using git command seems to cause troubles on some OS : changing config by changing '.gitconfig' file. * Remove some distros from tests pool Git is not installed or is out of date on these distros. * Fix aliases to skip tests on centos6 * Refactor tests of the git_config module * Add use case when state=absent and value is defined
This commit is contained in:
11
test/integration/targets/git_config/tasks/setup.yml
Normal file
11
test/integration/targets/git_config/tasks/setup.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
- name: verify that git is installed so this test can continue
|
||||
command: which git
|
||||
register: git_installed
|
||||
ignore_errors: yes
|
||||
|
||||
- name: get git version, only newer than {{git_version_supporting_includes}} has includes option
|
||||
shell: "git --version | grep 'git version' | sed 's/git version //'"
|
||||
register: git_version
|
||||
ignore_errors: yes
|
||||
...
|
||||
Reference in New Issue
Block a user