a11943d9b1
Change-Id: I09a133b5c4f6c71e10d274be1c70b7edcce1c83c
(cherry picked from commit a8f6dbd904
)
37 lines
1006 B
YAML
37 lines
1006 B
YAML
---
|
|
- name: Create keystone domain
|
|
openstack.cloud.identity_domain:
|
|
cloud: "{{ cloud }}"
|
|
state: present
|
|
name: "{{ domain_name }}"
|
|
description: "test description"
|
|
register: os_domain
|
|
|
|
- name: Test output
|
|
assert:
|
|
that:
|
|
- "'domain' in os_domain"
|
|
- os_domain.domain.name == domain_name
|
|
- >-
|
|
('enabled' in os_domain.domain.keys() and os_domain.domain['enabled']|bool) or
|
|
('is_enabled' in os_domain.domain and os_domain.domain['is_enabled']|bool)
|
|
- os_domain.domain.description == "test description"
|
|
|
|
- name: Update keystone domain
|
|
openstack.cloud.identity_domain:
|
|
cloud: "{{ cloud }}"
|
|
name: "{{ domain_name }}"
|
|
description: "updated description"
|
|
register: os_domain_updated
|
|
|
|
- name: Test output
|
|
assert:
|
|
that:
|
|
- os_domain_updated.domain.description == "updated description"
|
|
|
|
- name: Delete keystone domain
|
|
openstack.cloud.identity_domain:
|
|
cloud: "{{ cloud }}"
|
|
state: absent
|
|
name: "{{ domain_name }}"
|