mirror of
https://opendev.org/openstack/ansible-collections-openstack.git
synced 2026-07-25 09:14:31 +00:00
Make it compatible with new SDK and fix bug with "enabled" Change-Id: I1f577fae27c24c257571d1cf90e49527470edace
37 lines
1014 B
YAML
37 lines
1014 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 }}"
|