1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/integration/targets/cs_configuration/tasks/account.yml

77 lines
2.2 KiB
YAML
Raw Normal View History

---
- name: test configuration account
cs_configuration:
name: allow.public.user.templates
account: "{{ test_cs_configuration_account }}"
value: true
register: config
- name: verify test configuration storage
assert:
that:
- config|success
- name: test update configuration account in check mode
cs_configuration:
name: allow.public.user.templates
account: "{{ test_cs_configuration_account }}"
value: false
register: config
check_mode: true
- name: verify update configuration account in check mode
assert:
that:
- config|success
- config|changed
- config.value == "true"
- config.name == "allow.public.user.templates"
- config.scope == "account"
- config.account == "{{ test_cs_configuration_account }}"
- name: test update configuration account
cs_configuration:
name: allow.public.user.templates
account: "{{ test_cs_configuration_account }}"
value: false
register: config
- name: verify update configuration account
assert:
that:
- config|success
- config|changed
- config.value == "false"
- config.name == "allow.public.user.templates"
- config.scope == "account"
- config.account == "{{ test_cs_configuration_account }}"
- name: test update configuration account idempotence
cs_configuration:
name: allow.public.user.templates
account: "{{ test_cs_configuration_account }}"
value: false
register: config
- name: verify update configuration account idempotence
assert:
that:
- config|success
- not config|changed
- config.value == "false"
- config.name == "allow.public.user.templates"
- config.scope == "account"
- config.account == "{{ test_cs_configuration_account }}"
- name: test reset configuration account
cs_configuration:
name: allow.public.user.templates
account: "{{ test_cs_configuration_account }}"
value: true
register: config
- name: verify update configuration account
assert:
that:
- config|success
- config|changed
- config.value == "true"
- config.name == "allow.public.user.templates"
- config.scope == "account"
- config.account == "{{ test_cs_configuration_account }}"