You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/git_config/tasks/get_set_state_present.yml

28 lines
690 B
YAML

---
- import_tasks: setup_no_value.yml
- name: setting value with state=present
git_config:
name: "{{ option_name }}"
value: "{{ option_value }}"
scope: "{{ option_scope }}"
state: present
register: result
- name: getting value with state=present
git_config:
name: "{{ option_name }}"
scope: "{{ option_scope }}"
state: present
register: get_result
- name: assert set changed and value is correct with state=present
assert:
that:
- set_result.changed == true
- set_result.diff.before == "\n"
- set_result.diff.after == option_value + "\n"
- get_result.changed == false
- get_result.config_value == option_value
...