mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-08 14:20:04 -07:00
(cherry picked from commit 436bbb0077
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
248128f282
commit
451428af04
4 changed files with 42 additions and 7 deletions
|
@ -24,5 +24,7 @@
|
|||
- import_tasks: precedence_between_unset_and_value.yml
|
||||
# testing state=absent with check mode
|
||||
- import_tasks: unset_check_mode.yml
|
||||
# testing for case in issue #1776
|
||||
- import_tasks: set_value_with_tilde.yml
|
||||
when: git_installed is succeeded and git_version.stdout is version(git_version_supporting_includes, ">=")
|
||||
...
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
---
|
||||
#- import_tasks: setup_no_value.yml
|
||||
|
||||
- name: setting value
|
||||
git_config:
|
||||
name: core.hooksPath
|
||||
value: '~/foo/bar'
|
||||
state: present
|
||||
scope: global
|
||||
register: set_result
|
||||
|
||||
- name: setting value again
|
||||
git_config:
|
||||
name: core.hooksPath
|
||||
value: '~/foo/bar'
|
||||
state: present
|
||||
scope: global
|
||||
register: set_result2
|
||||
|
||||
- name: getting value
|
||||
git_config:
|
||||
name: core.hooksPath
|
||||
scope: global
|
||||
register: get_result
|
||||
|
||||
- name: assert set changed and value is correct
|
||||
assert:
|
||||
that:
|
||||
- set_result is changed
|
||||
- set_result2 is not changed
|
||||
- get_result is not changed
|
||||
- get_result.config_value == '~/foo/bar'
|
||||
...
|
Loading…
Add table
Add a link
Reference in a new issue