Collection: Use random names when we create objects in our tests

This commit is contained in:
Caleb Boylan
2020-03-17 11:49:09 -07:00
parent e210ee4077
commit a03d74d828
16 changed files with 467 additions and 154 deletions

View File

@@ -1,7 +1,8 @@
---
- name: Generate an inventory name
- name: Generate names
set_fact:
inv_name: "inv-for-group-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
group_name: "AWX-Collection-tests-tower_group-group-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
inv_name: "AWX-Collection-test-tower_group-inv-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
- name: Create an Inventory
tower_inventory:
@@ -11,7 +12,7 @@
- name: Create a Group
tower_group:
name: Some Group
name: "{{ group_name }}"
inventory: "{{ inv_name }}"
state: present
variables:
@@ -24,7 +25,7 @@
- name: Delete a Group
tower_group:
name: Some Group
name: "{{ group_name }}"
inventory: "{{ inv_name }}"
state: absent
register: result