mirror of
https://opendev.org/openstack/ansible-collections-openstack.git
synced 2026-05-07 13:53:15 +00:00
Add Traits Module
Change-Id: I7db759f716c1154cb0dd30e240af3a0420efab8f Signed-off-by: Freerk-Ole Zakfeld <fzakfeld@scaleuptech.com>
This commit is contained in:
1
ci/roles/trait/defaults/main.yml
Normal file
1
ci/roles/trait/defaults/main.yml
Normal file
@@ -0,0 +1 @@
|
||||
trait_name: CUSTOM_ANSIBLE_TRAIT
|
||||
23
ci/roles/trait/tasks/main.yml
Normal file
23
ci/roles/trait/tasks/main.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
- openstack.cloud.trait:
|
||||
cloud: "{{ cloud }}"
|
||||
state: present
|
||||
id: "{{ trait_name }}"
|
||||
delegate_to: localhost
|
||||
register: item
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "'name' in item.trait"
|
||||
- "item.trait.id == trait_name"
|
||||
|
||||
- openstack.cloud.trait:
|
||||
cloud: "{{ cloud }}"
|
||||
state: absent
|
||||
id: "{{ trait_name }}"
|
||||
delegate_to: localhost
|
||||
register: item
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "'trait' not in item"
|
||||
@@ -36,6 +36,7 @@
|
||||
- { role: object, tags: object }
|
||||
- { role: object_container, tags: object_container }
|
||||
- { role: port, tags: port }
|
||||
- { role: trait, tags: trait }
|
||||
- { role: trunk, tags: trunk }
|
||||
- { role: project, tags: project }
|
||||
- { role: quota, tags: quota }
|
||||
|
||||
Reference in New Issue
Block a user