mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
781fd7099a
- Move legacy tests into a separate directory. - Reduce common dependencies between targets.
35 lines
930 B
YAML
35 lines
930 B
YAML
---
|
|
|
|
- name: create a new ACL without rules
|
|
consul_acl:
|
|
host: "{{ acl_host }}"
|
|
mgmt_token: "{{ mgmt_token }}"
|
|
name: "{{ test_consul_acl_token_name }}"
|
|
register: created_ruleless_acl
|
|
|
|
- name: verify ACL created without rules
|
|
assert:
|
|
that:
|
|
- created_ruleless_acl.changed
|
|
- created_ruleless_acl.operation == "create"
|
|
- created_ruleless_acl.token | length == 36
|
|
- created_ruleless_acl.rules == {}
|
|
|
|
- name: create same rule-less ACL
|
|
consul_acl:
|
|
host: "{{ acl_host }}"
|
|
mgmt_token: "{{ mgmt_token }}"
|
|
name: "{{ test_consul_acl_token_name }}"
|
|
register: doubly_created_ruleless_acl
|
|
|
|
- name: verify idempotence when creating ruleless ACL tokens
|
|
assert:
|
|
that:
|
|
- not doubly_created_ruleless_acl.changed
|
|
|
|
- name: clean up
|
|
consul_acl:
|
|
host: "{{ acl_host }}"
|
|
mgmt_token: "{{ mgmt_token }}"
|
|
token: "{{ doubly_created_ruleless_acl.token }}"
|
|
state: absent
|