mirror of
https://github.com/ansible/awx.git
synced 2026-03-09 05:29:26 -02:30
regex replace tower_*: to ''
This commit is contained in:
@@ -11,24 +11,24 @@
|
|||||||
org_name: "AWX-Collection-tests-tower_tower_ad_hoc_command-org-{{ test_id }}"
|
org_name: "AWX-Collection-tests-tower_tower_ad_hoc_command-org-{{ test_id }}"
|
||||||
|
|
||||||
- name: Create a New Organization
|
- name: Create a New Organization
|
||||||
tower_organization:
|
organization:
|
||||||
name: "{{ org_name }}"
|
name: "{{ org_name }}"
|
||||||
|
|
||||||
- name: Create an Inventory
|
- name: Create an Inventory
|
||||||
tower_inventory:
|
inventory:
|
||||||
name: "{{ inv_name }}"
|
name: "{{ inv_name }}"
|
||||||
organization: "{{ org_name }}"
|
organization: "{{ org_name }}"
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Add localhost to the Inventory
|
- name: Add localhost to the Inventory
|
||||||
tower_host:
|
host:
|
||||||
name: localhost
|
name: localhost
|
||||||
inventory: "{{ inv_name }}"
|
inventory: "{{ inv_name }}"
|
||||||
variables:
|
variables:
|
||||||
ansible_connection: local
|
ansible_connection: local
|
||||||
|
|
||||||
- name: Create a Credential
|
- name: Create a Credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ ssh_cred_name }}"
|
name: "{{ ssh_cred_name }}"
|
||||||
organization: "{{ org_name }}"
|
organization: "{{ org_name }}"
|
||||||
credential_type: 'Machine'
|
credential_type: 'Machine'
|
||||||
@@ -76,19 +76,19 @@
|
|||||||
- "'Does not exist' in result.response['json']['module_name'][0]"
|
- "'Does not exist' in result.response['json']['module_name'][0]"
|
||||||
|
|
||||||
- name: Delete the Credential
|
- name: Delete the Credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ ssh_cred_name }}"
|
name: "{{ ssh_cred_name }}"
|
||||||
organization: "{{ org_name }}"
|
organization: "{{ org_name }}"
|
||||||
credential_type: 'Machine'
|
credential_type: 'Machine'
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: Delete the Inventory
|
- name: Delete the Inventory
|
||||||
tower_inventory:
|
inventory:
|
||||||
name: "{{ inv_name }}"
|
name: "{{ inv_name }}"
|
||||||
organization: "{{ org_name }}"
|
organization: "{{ org_name }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: Remove the Organization
|
- name: Remove the Organization
|
||||||
tower_organization:
|
organization:
|
||||||
name: "{{ org_name }}"
|
name: "{{ org_name }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
|||||||
@@ -11,24 +11,24 @@
|
|||||||
org_name: "AWX-Collection-tests-tower_tower_ad_hoc_command_cancel-org-{{ test_id }}"
|
org_name: "AWX-Collection-tests-tower_tower_ad_hoc_command_cancel-org-{{ test_id }}"
|
||||||
|
|
||||||
- name: Create a New Organization
|
- name: Create a New Organization
|
||||||
tower_organization:
|
organization:
|
||||||
name: "{{ org_name }}"
|
name: "{{ org_name }}"
|
||||||
|
|
||||||
- name: Create an Inventory
|
- name: Create an Inventory
|
||||||
tower_inventory:
|
inventory:
|
||||||
name: "{{ inv_name }}"
|
name: "{{ inv_name }}"
|
||||||
organization: "{{ org_name }}"
|
organization: "{{ org_name }}"
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Add localhost to the Inventory
|
- name: Add localhost to the Inventory
|
||||||
tower_host:
|
host:
|
||||||
name: localhost
|
name: localhost
|
||||||
inventory: "{{ inv_name }}"
|
inventory: "{{ inv_name }}"
|
||||||
variables:
|
variables:
|
||||||
ansible_connection: local
|
ansible_connection: local
|
||||||
|
|
||||||
- name: Create a Credential
|
- name: Create a Credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ ssh_cred_name }}"
|
name: "{{ ssh_cred_name }}"
|
||||||
organization: "{{ org_name }}"
|
organization: "{{ org_name }}"
|
||||||
credential_type: 'Machine'
|
credential_type: 'Machine'
|
||||||
@@ -91,19 +91,19 @@
|
|||||||
- "result.msg == 'Unable to find command with id 9999999999'"
|
- "result.msg == 'Unable to find command with id 9999999999'"
|
||||||
|
|
||||||
- name: Delete the Credential
|
- name: Delete the Credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ ssh_cred_name }}"
|
name: "{{ ssh_cred_name }}"
|
||||||
organization: "{{ org_name }}"
|
organization: "{{ org_name }}"
|
||||||
credential_type: 'Machine'
|
credential_type: 'Machine'
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: Delete the Inventory
|
- name: Delete the Inventory
|
||||||
tower_inventory:
|
inventory:
|
||||||
name: "{{ inv_name }}"
|
name: "{{ inv_name }}"
|
||||||
organization: "{{ org_name }}"
|
organization: "{{ org_name }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: Remove the Organization
|
- name: Remove the Organization
|
||||||
tower_organization:
|
organization:
|
||||||
name: "{{ org_name }}"
|
name: "{{ org_name }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
|||||||
@@ -11,24 +11,24 @@
|
|||||||
org_name: "AWX-Collection-tests-tower_ad_hoc_command_wait-org-{{ test_id }}"
|
org_name: "AWX-Collection-tests-tower_ad_hoc_command_wait-org-{{ test_id }}"
|
||||||
|
|
||||||
- name: Create a New Organization
|
- name: Create a New Organization
|
||||||
tower_organization:
|
organization:
|
||||||
name: "{{ org_name }}"
|
name: "{{ org_name }}"
|
||||||
|
|
||||||
- name: Create an Inventory
|
- name: Create an Inventory
|
||||||
tower_inventory:
|
inventory:
|
||||||
name: "{{ inv_name }}"
|
name: "{{ inv_name }}"
|
||||||
organization: "{{ org_name }}"
|
organization: "{{ org_name }}"
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Add localhost to the Inventory
|
- name: Add localhost to the Inventory
|
||||||
tower_host:
|
host:
|
||||||
name: localhost
|
name: localhost
|
||||||
inventory: "{{ inv_name }}"
|
inventory: "{{ inv_name }}"
|
||||||
variables:
|
variables:
|
||||||
ansible_connection: local
|
ansible_connection: local
|
||||||
|
|
||||||
- name: Create a Credential
|
- name: Create a Credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ ssh_cred_name }}"
|
name: "{{ ssh_cred_name }}"
|
||||||
organization: "{{ org_name }}"
|
organization: "{{ org_name }}"
|
||||||
credential_type: 'Machine'
|
credential_type: 'Machine'
|
||||||
@@ -113,19 +113,19 @@
|
|||||||
- "wait_results.msg == 'The ad hoc command - {{ command.id }}, failed'"
|
- "wait_results.msg == 'The ad hoc command - {{ command.id }}, failed'"
|
||||||
|
|
||||||
- name: Delete the Credential
|
- name: Delete the Credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ ssh_cred_name }}"
|
name: "{{ ssh_cred_name }}"
|
||||||
organization: "{{ org_name }}"
|
organization: "{{ org_name }}"
|
||||||
credential_type: 'Machine'
|
credential_type: 'Machine'
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: Delete the Inventory
|
- name: Delete the Inventory
|
||||||
tower_inventory:
|
inventory:
|
||||||
name: "{{ inv_name }}"
|
name: "{{ inv_name }}"
|
||||||
organization: "{{ org_name }}"
|
organization: "{{ org_name }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: Remove the Organization
|
- name: Remove the Organization
|
||||||
tower_organization:
|
organization:
|
||||||
name: "{{ org_name }}"
|
name: "{{ org_name }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: Create an application
|
- name: Create an application
|
||||||
tower_application:
|
application:
|
||||||
name: "{{ app1_name }}"
|
name: "{{ app1_name }}"
|
||||||
authorization_grant_type: "password"
|
authorization_grant_type: "password"
|
||||||
client_type: "public"
|
client_type: "public"
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Delete our application
|
- name: Delete our application
|
||||||
tower_application:
|
application:
|
||||||
name: "{{ app1_name }}"
|
name: "{{ app1_name }}"
|
||||||
organization: "Default"
|
organization: "Default"
|
||||||
state: absent
|
state: absent
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Create a second application
|
- name: Create a second application
|
||||||
tower_application:
|
application:
|
||||||
name: "{{ app2_name }}"
|
name: "{{ app2_name }}"
|
||||||
authorization_grant_type: "authorization-code"
|
authorization_grant_type: "authorization-code"
|
||||||
client_type: "confidential"
|
client_type: "confidential"
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Create an all trusting application
|
- name: Create an all trusting application
|
||||||
tower_application:
|
application:
|
||||||
name: "{{ app3_name }}"
|
name: "{{ app3_name }}"
|
||||||
organization: "Default"
|
organization: "Default"
|
||||||
description: "All Trusting Application"
|
description: "All Trusting Application"
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
|
|
||||||
always:
|
always:
|
||||||
- name: Delete our application
|
- name: Delete our application
|
||||||
tower_application:
|
application:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
organization: "Default"
|
organization: "Default"
|
||||||
state: absent
|
state: absent
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
ssh_key_data: "{{ lookup('file', tempdir.stdout + '/id_rsa') }}"
|
ssh_key_data: "{{ lookup('file', tempdir.stdout + '/id_rsa') }}"
|
||||||
|
|
||||||
- name: Test deprecation warnings
|
- name: Test deprecation warnings
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ ssh_cred_name1 }}"
|
name: "{{ ssh_cred_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
kind: ssh
|
kind: ssh
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
- result['deprecations'] | length() == 20
|
- result['deprecations'] | length() == 20
|
||||||
|
|
||||||
- name: Create an Org-specific credential (old school)
|
- name: Create an Org-specific credential (old school)
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ ssh_cred_name1 }}"
|
name: "{{ ssh_cred_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: present
|
state: present
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Re-create the Org-specific credential (new school) with an ID
|
- name: Re-create the Org-specific credential (new school) with an ID
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ result.id }}"
|
name: "{{ result.id }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
credential_type: 'Machine'
|
credential_type: 'Machine'
|
||||||
@@ -94,7 +94,7 @@
|
|||||||
- "result is not changed"
|
- "result is not changed"
|
||||||
|
|
||||||
- name: Delete a Org-specific credential
|
- name: Delete a Org-specific credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ ssh_cred_name1 }}"
|
name: "{{ ssh_cred_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: absent
|
state: absent
|
||||||
@@ -106,7 +106,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Create the User-specific credential
|
- name: Create the User-specific credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ ssh_cred_name1 }}"
|
name: "{{ ssh_cred_name1 }}"
|
||||||
user: admin
|
user: admin
|
||||||
credential_type: 'Machine'
|
credential_type: 'Machine'
|
||||||
@@ -118,7 +118,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Delete a User-specific credential
|
- name: Delete a User-specific credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ ssh_cred_name1 }}"
|
name: "{{ ssh_cred_name1 }}"
|
||||||
user: admin
|
user: admin
|
||||||
state: absent
|
state: absent
|
||||||
@@ -130,7 +130,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Create a valid SSH credential (old school)
|
- name: Create a valid SSH credential (old school)
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ ssh_cred_name2 }}"
|
name: "{{ ssh_cred_name2 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: present
|
state: present
|
||||||
@@ -150,7 +150,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Create a valid SSH credential (new school)
|
- name: Create a valid SSH credential (new school)
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ ssh_cred_name2 }}"
|
name: "{{ ssh_cred_name2 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: present
|
state: present
|
||||||
@@ -173,7 +173,7 @@
|
|||||||
- result is changed
|
- result is changed
|
||||||
|
|
||||||
- name: Create a valid SSH credential (new school)
|
- name: Create a valid SSH credential (new school)
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ ssh_cred_name2 }}"
|
name: "{{ ssh_cred_name2 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: present
|
state: present
|
||||||
@@ -191,7 +191,7 @@
|
|||||||
- result is changed
|
- result is changed
|
||||||
|
|
||||||
- name: Check for inputs idempotency (when "inputs" is blank)
|
- name: Check for inputs idempotency (when "inputs" is blank)
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ ssh_cred_name2 }}"
|
name: "{{ ssh_cred_name2 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: present
|
state: present
|
||||||
@@ -204,7 +204,7 @@
|
|||||||
- result is not changed
|
- result is not changed
|
||||||
|
|
||||||
- name: Copy ssh Credential
|
- name: Copy ssh Credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "copy_{{ ssh_cred_name2 }}"
|
name: "copy_{{ ssh_cred_name2 }}"
|
||||||
copy_from: "{{ ssh_cred_name2 }}"
|
copy_from: "{{ ssh_cred_name2 }}"
|
||||||
credential_type: Machine
|
credential_type: Machine
|
||||||
@@ -215,7 +215,7 @@
|
|||||||
- result.copied
|
- result.copied
|
||||||
|
|
||||||
- name: Delete an SSH credential
|
- name: Delete an SSH credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "copy_{{ ssh_cred_name2 }}"
|
name: "copy_{{ ssh_cred_name2 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: absent
|
state: absent
|
||||||
@@ -227,7 +227,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Create a valid SSH credential from lookup source (old school)
|
- name: Create a valid SSH credential from lookup source (old school)
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ ssh_cred_name3 }}"
|
name: "{{ ssh_cred_name3 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: present
|
state: present
|
||||||
@@ -247,7 +247,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Create a valid SSH credential from lookup source (new school)
|
- name: Create a valid SSH credential from lookup source (new school)
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ ssh_cred_name3 }}"
|
name: "{{ ssh_cred_name3 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: present
|
state: present
|
||||||
@@ -269,7 +269,7 @@
|
|||||||
- result is changed
|
- result is changed
|
||||||
|
|
||||||
- name: Fail to create an SSH credential from a file source (old school format)
|
- name: Fail to create an SSH credential from a file source (old school format)
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ ssh_cred_name4 }}"
|
name: "{{ ssh_cred_name4 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: present
|
state: present
|
||||||
@@ -292,7 +292,7 @@
|
|||||||
- "'Invalid certificate or key' in result.msg"
|
- "'Invalid certificate or key' in result.msg"
|
||||||
|
|
||||||
- name: Create an invalid SSH credential (passphrase required)
|
- name: Create an invalid SSH credential (passphrase required)
|
||||||
tower_credential:
|
credential:
|
||||||
name: SSH Credential
|
name: SSH Credential
|
||||||
organization: Default
|
organization: Default
|
||||||
state: present
|
state: present
|
||||||
@@ -308,7 +308,7 @@
|
|||||||
- "'must be set when SSH key is encrypted' in result.msg"
|
- "'must be set when SSH key is encrypted' in result.msg"
|
||||||
|
|
||||||
- name: Create an invalid SSH credential (Organization not found)
|
- name: Create an invalid SSH credential (Organization not found)
|
||||||
tower_credential:
|
credential:
|
||||||
name: SSH Credential
|
name: SSH Credential
|
||||||
organization: Missing_Organization
|
organization: Missing_Organization
|
||||||
state: present
|
state: present
|
||||||
@@ -325,7 +325,7 @@
|
|||||||
- "result.total_results == 0"
|
- "result.total_results == 0"
|
||||||
|
|
||||||
- name: Delete an SSH credential
|
- name: Delete an SSH credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ ssh_cred_name2 }}"
|
name: "{{ ssh_cred_name2 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: absent
|
state: absent
|
||||||
@@ -337,7 +337,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Delete an SSH credential
|
- name: Delete an SSH credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ ssh_cred_name3 }}"
|
name: "{{ ssh_cred_name3 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: absent
|
state: absent
|
||||||
@@ -349,7 +349,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Delete an SSH credential
|
- name: Delete an SSH credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ ssh_cred_name4 }}"
|
name: "{{ ssh_cred_name4 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: absent
|
state: absent
|
||||||
@@ -362,7 +362,7 @@
|
|||||||
- "result is not changed"
|
- "result is not changed"
|
||||||
|
|
||||||
- name: Create a valid Vault credential
|
- name: Create a valid Vault credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ vault_cred_name1 }}"
|
name: "{{ vault_cred_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: present
|
state: present
|
||||||
@@ -376,7 +376,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Delete a Vault credential
|
- name: Delete a Vault credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ vault_cred_name1 }}"
|
name: "{{ vault_cred_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: absent
|
state: absent
|
||||||
@@ -388,7 +388,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Delete a Vault credential
|
- name: Delete a Vault credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ vault_cred_name2 }}"
|
name: "{{ vault_cred_name2 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: absent
|
state: absent
|
||||||
@@ -401,7 +401,7 @@
|
|||||||
- "result is not changed"
|
- "result is not changed"
|
||||||
|
|
||||||
- name: Create a valid Network credential
|
- name: Create a valid Network credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ net_cred_name1 }}"
|
name: "{{ net_cred_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: present
|
state: present
|
||||||
@@ -417,7 +417,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Delete a Network credential
|
- name: Delete a Network credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ net_cred_name1 }}"
|
name: "{{ net_cred_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: absent
|
state: absent
|
||||||
@@ -429,7 +429,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Create a valid SCM credential
|
- name: Create a valid SCM credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ scm_cred_name1 }}"
|
name: "{{ scm_cred_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: present
|
state: present
|
||||||
@@ -445,7 +445,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Delete an SCM credential
|
- name: Delete an SCM credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ scm_cred_name1 }}"
|
name: "{{ scm_cred_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: absent
|
state: absent
|
||||||
@@ -457,7 +457,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Create a valid AWS credential
|
- name: Create a valid AWS credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ aws_cred_name1 }}"
|
name: "{{ aws_cred_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: present
|
state: present
|
||||||
@@ -472,7 +472,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Delete an AWS credential
|
- name: Delete an AWS credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ aws_cred_name1 }}"
|
name: "{{ aws_cred_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: absent
|
state: absent
|
||||||
@@ -484,7 +484,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Create a valid VMWare credential
|
- name: Create a valid VMWare credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ vmware_cred_name1 }}"
|
name: "{{ vmware_cred_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: present
|
state: present
|
||||||
@@ -499,7 +499,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Delete an VMWare credential
|
- name: Delete an VMWare credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ vmware_cred_name1 }}"
|
name: "{{ vmware_cred_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: absent
|
state: absent
|
||||||
@@ -511,7 +511,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Create a valid Satellite6 credential
|
- name: Create a valid Satellite6 credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ sat6_cred_name1 }}"
|
name: "{{ sat6_cred_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: present
|
state: present
|
||||||
@@ -526,7 +526,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Delete a Satellite6 credential
|
- name: Delete a Satellite6 credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ sat6_cred_name1 }}"
|
name: "{{ sat6_cred_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: absent
|
state: absent
|
||||||
@@ -538,7 +538,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Create a valid GCE credential
|
- name: Create a valid GCE credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ gce_cred_name1 }}"
|
name: "{{ gce_cred_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: present
|
state: present
|
||||||
@@ -553,7 +553,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Delete a GCE credential
|
- name: Delete a GCE credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ gce_cred_name1 }}"
|
name: "{{ gce_cred_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: absent
|
state: absent
|
||||||
@@ -565,7 +565,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Create a valid AzureRM credential
|
- name: Create a valid AzureRM credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ azurerm_cred_name1 }}"
|
name: "{{ azurerm_cred_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: present
|
state: present
|
||||||
@@ -580,7 +580,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Create a valid AzureRM credential with a tenant
|
- name: Create a valid AzureRM credential with a tenant
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ azurerm_cred_name1 }}"
|
name: "{{ azurerm_cred_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: present
|
state: present
|
||||||
@@ -596,7 +596,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Delete an AzureRM credential
|
- name: Delete an AzureRM credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ azurerm_cred_name1 }}"
|
name: "{{ azurerm_cred_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: absent
|
state: absent
|
||||||
@@ -608,7 +608,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Create a valid OpenStack credential
|
- name: Create a valid OpenStack credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ openstack_cred_name1 }}"
|
name: "{{ openstack_cred_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: present
|
state: present
|
||||||
@@ -625,7 +625,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Delete a OpenStack credential
|
- name: Delete a OpenStack credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ openstack_cred_name1 }}"
|
name: "{{ openstack_cred_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: absent
|
state: absent
|
||||||
@@ -637,7 +637,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Create a valid RHV credential
|
- name: Create a valid RHV credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ rhv_cred_name1 }}"
|
name: "{{ rhv_cred_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: present
|
state: present
|
||||||
@@ -652,7 +652,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Delete an RHV credential
|
- name: Delete an RHV credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ rhv_cred_name1 }}"
|
name: "{{ rhv_cred_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: absent
|
state: absent
|
||||||
@@ -664,7 +664,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Create a valid Insights credential
|
- name: Create a valid Insights credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ insights_cred_name1 }}"
|
name: "{{ insights_cred_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: present
|
state: present
|
||||||
@@ -678,7 +678,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Delete an Insights credential
|
- name: Delete an Insights credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ insights_cred_name1 }}"
|
name: "{{ insights_cred_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: absent
|
state: absent
|
||||||
@@ -690,7 +690,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Create a valid Tower-to-Tower credential
|
- name: Create a valid Tower-to-Tower credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ tower_cred_name1 }}"
|
name: "{{ tower_cred_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: present
|
state: present
|
||||||
@@ -705,7 +705,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Delete a Tower-to-Tower credential
|
- name: Delete a Tower-to-Tower credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ tower_cred_name1 }}"
|
name: "{{ tower_cred_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: absent
|
state: absent
|
||||||
@@ -717,7 +717,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Check module fails with correct msg
|
- name: Check module fails with correct msg
|
||||||
tower_credential:
|
credential:
|
||||||
name: test-credential
|
name: test-credential
|
||||||
description: Credential Description
|
description: Credential Description
|
||||||
kind: ssh
|
kind: ssh
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: Add Tower credential Lookup
|
- name: Add Tower credential Lookup
|
||||||
tower_credential:
|
credential:
|
||||||
description: Credential for Testing Source
|
description: Credential for Testing Source
|
||||||
name: "{{ src_cred_name }}"
|
name: "{{ src_cred_name }}"
|
||||||
credential_type: CyberArk AIM Central Credential Provider Lookup
|
credential_type: CyberArk AIM Central Credential Provider Lookup
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
- "src_cred_result is changed"
|
- "src_cred_result is changed"
|
||||||
|
|
||||||
- name: Add Tower credential Target
|
- name: Add Tower credential Target
|
||||||
tower_credential:
|
credential:
|
||||||
description: Credential for Testing Target
|
description: Credential for Testing Target
|
||||||
name: "{{ target_cred_name }}"
|
name: "{{ target_cred_name }}"
|
||||||
credential_type: Machine
|
credential_type: Machine
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Add Second Tower credential Lookup
|
- name: Add Second Tower credential Lookup
|
||||||
tower_credential:
|
credential:
|
||||||
description: Credential for Testing Source Change
|
description: Credential for Testing Source Change
|
||||||
name: "{{ src_cred_name }}-2"
|
name: "{{ src_cred_name }}-2"
|
||||||
credential_type: CyberArk AIM Central Credential Provider Lookup
|
credential_type: CyberArk AIM Central Credential Provider Lookup
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Remove Tower credential Lookup
|
- name: Remove Tower credential Lookup
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ src_cred_name }}"
|
name: "{{ src_cred_name }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
credential_type: CyberArk AIM Central Credential Provider Lookup
|
credential_type: CyberArk AIM Central Credential Provider Lookup
|
||||||
@@ -97,7 +97,7 @@
|
|||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Remove Alt Tower credential Lookup
|
- name: Remove Alt Tower credential Lookup
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ src_cred_name }}-2"
|
name: "{{ src_cred_name }}-2"
|
||||||
organization: Default
|
organization: Default
|
||||||
credential_type: CyberArk AIM Central Credential Provider Lookup
|
credential_type: CyberArk AIM Central Credential Provider Lookup
|
||||||
@@ -105,7 +105,7 @@
|
|||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Remove Tower credential
|
- name: Remove Tower credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ target_cred_name }}"
|
name: "{{ target_cred_name }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
credential_type: Machine
|
credential_type: Machine
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
---
|
---
|
||||||
- name: Assure that default organization exists
|
- name: Assure that default organization exists
|
||||||
tower_organization:
|
organization:
|
||||||
name: Default
|
name: Default
|
||||||
|
|
||||||
- name: HACK - delete orphaned projects from preload data where organization deletd
|
- name: HACK - delete orphaned projects from preload data where organization deletd
|
||||||
tower_project:
|
project:
|
||||||
name: "{{ item['id'] }}"
|
name: "{{ item['id'] }}"
|
||||||
scm_type: git
|
scm_type: git
|
||||||
state: absent
|
state: absent
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
label: "Deleting Demo Project with null organization id={{ item['id'] }}"
|
label: "Deleting Demo Project with null organization id={{ item['id'] }}"
|
||||||
|
|
||||||
- name: Assure that demo project exists
|
- name: Assure that demo project exists
|
||||||
tower_project:
|
project:
|
||||||
name: "Demo Project"
|
name: "Demo Project"
|
||||||
scm_type: 'git'
|
scm_type: 'git'
|
||||||
scm_url: 'https://github.com/ansible/ansible-tower-samples'
|
scm_url: 'https://github.com/ansible/ansible-tower-samples'
|
||||||
@@ -24,12 +24,12 @@
|
|||||||
organization: Default
|
organization: Default
|
||||||
|
|
||||||
- name: Assure that demo inventory exists
|
- name: Assure that demo inventory exists
|
||||||
tower_inventory:
|
inventory:
|
||||||
name: "Demo Inventory"
|
name: "Demo Inventory"
|
||||||
organization: Default
|
organization: Default
|
||||||
|
|
||||||
- name: Create a Host
|
- name: Create a Host
|
||||||
tower_host:
|
host:
|
||||||
name: "localhost"
|
name: "localhost"
|
||||||
inventory: "Demo Inventory"
|
inventory: "Demo Inventory"
|
||||||
state: present
|
state: present
|
||||||
|
|||||||
@@ -12,19 +12,19 @@
|
|||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: Create some organizations
|
- name: Create some organizations
|
||||||
tower_organization:
|
organization:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
loop:
|
loop:
|
||||||
- "{{ org_name1 }}"
|
- "{{ org_name1 }}"
|
||||||
- "{{ org_name2 }}"
|
- "{{ org_name2 }}"
|
||||||
|
|
||||||
- name: Create an inventory
|
- name: Create an inventory
|
||||||
tower_inventory:
|
inventory:
|
||||||
name: "{{ inventory_name1 }}"
|
name: "{{ inventory_name1 }}"
|
||||||
organization: "{{ org_name1 }}"
|
organization: "{{ org_name1 }}"
|
||||||
|
|
||||||
- name: Export all tower assets
|
- name: Export all tower assets
|
||||||
tower_export:
|
export:
|
||||||
all: true
|
all: true
|
||||||
register: all_assets
|
register: all_assets
|
||||||
|
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
- all_assets['assets']['organizations'] | length() >= 2
|
- all_assets['assets']['organizations'] | length() >= 2
|
||||||
|
|
||||||
- name: Export all inventories
|
- name: Export all inventories
|
||||||
tower_export:
|
export:
|
||||||
inventory: 'all'
|
inventory: 'all'
|
||||||
register: inventory_export
|
register: inventory_export
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
|
|
||||||
# This mimics the example in the module
|
# This mimics the example in the module
|
||||||
- name: Export an all and a specific
|
- name: Export an all and a specific
|
||||||
tower_export:
|
export:
|
||||||
inventory: 'all'
|
inventory: 'all'
|
||||||
organizations: "{{ org_name1 }}"
|
organizations: "{{ org_name1 }}"
|
||||||
register: mixed_export
|
register: mixed_export
|
||||||
@@ -63,13 +63,13 @@
|
|||||||
|
|
||||||
always:
|
always:
|
||||||
- name: Remove our inventory
|
- name: Remove our inventory
|
||||||
tower_inventory:
|
inventory:
|
||||||
name: "{{ inventory_name1 }}"
|
name: "{{ inventory_name1 }}"
|
||||||
organization: "{{ org_name1 }}"
|
organization: "{{ org_name1 }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: Remove test organizations
|
- name: Remove test organizations
|
||||||
tower_organization:
|
organization:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: absent
|
state: absent
|
||||||
loop:
|
loop:
|
||||||
|
|||||||
@@ -10,14 +10,14 @@
|
|||||||
host_name3: "AWX-Collection-test-tower_group-host-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
|
host_name3: "AWX-Collection-test-tower_group-host-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
|
||||||
|
|
||||||
- name: Create an Inventory
|
- name: Create an Inventory
|
||||||
tower_inventory:
|
inventory:
|
||||||
name: "{{ inv_name }}"
|
name: "{{ inv_name }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: present
|
state: present
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Create a Group
|
- name: Create a Group
|
||||||
tower_group:
|
group:
|
||||||
name: "{{ group_name1 }}"
|
name: "{{ group_name1 }}"
|
||||||
inventory: "{{ result.id }}"
|
inventory: "{{ result.id }}"
|
||||||
state: present
|
state: present
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Create a Group
|
- name: Create a Group
|
||||||
tower_group:
|
group:
|
||||||
name: "{{ group_name2 }}"
|
name: "{{ group_name2 }}"
|
||||||
inventory: "{{ inv_name }}"
|
inventory: "{{ inv_name }}"
|
||||||
state: present
|
state: present
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Create a Group
|
- name: Create a Group
|
||||||
tower_group:
|
group:
|
||||||
name: "{{ group_name3 }}"
|
name: "{{ group_name3 }}"
|
||||||
inventory: "{{ inv_name }}"
|
inventory: "{{ inv_name }}"
|
||||||
state: present
|
state: present
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: add hosts
|
- name: add hosts
|
||||||
tower_host:
|
host:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
inventory: "{{ inv_name }}"
|
inventory: "{{ inv_name }}"
|
||||||
loop:
|
loop:
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
- "{{ host_name3 }}"
|
- "{{ host_name3 }}"
|
||||||
|
|
||||||
- name: Create a Group with hosts and sub group
|
- name: Create a Group with hosts and sub group
|
||||||
tower_group:
|
group:
|
||||||
name: "{{ group_name1 }}"
|
name: "{{ group_name1 }}"
|
||||||
inventory: "{{ inv_name }}"
|
inventory: "{{ inv_name }}"
|
||||||
hosts:
|
hosts:
|
||||||
@@ -79,7 +79,7 @@
|
|||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Create a Group with hosts and sub group
|
- name: Create a Group with hosts and sub group
|
||||||
tower_group:
|
group:
|
||||||
name: "{{ group_name1 }}"
|
name: "{{ group_name1 }}"
|
||||||
inventory: "{{ inv_name }}"
|
inventory: "{{ inv_name }}"
|
||||||
hosts:
|
hosts:
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
- group1_host_count == "3"
|
- group1_host_count == "3"
|
||||||
|
|
||||||
- name: Delete a Group
|
- name: Delete a Group
|
||||||
tower_group:
|
group:
|
||||||
name: "{{ group_name1 }}"
|
name: "{{ group_name1 }}"
|
||||||
inventory: "{{ inv_name }}"
|
inventory: "{{ inv_name }}"
|
||||||
state: absent
|
state: absent
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Delete a Group
|
- name: Delete a Group
|
||||||
tower_group:
|
group:
|
||||||
name: "{{ group_name2 }}"
|
name: "{{ group_name2 }}"
|
||||||
inventory: "{{ inv_name }}"
|
inventory: "{{ inv_name }}"
|
||||||
state: absent
|
state: absent
|
||||||
@@ -122,7 +122,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Delete a Group
|
- name: Delete a Group
|
||||||
tower_group:
|
group:
|
||||||
name: "{{ group_name3 }}"
|
name: "{{ group_name3 }}"
|
||||||
inventory: "{{ inv_name }}"
|
inventory: "{{ inv_name }}"
|
||||||
state: absent
|
state: absent
|
||||||
@@ -133,7 +133,7 @@
|
|||||||
- "result is not changed"
|
- "result is not changed"
|
||||||
|
|
||||||
- name: Check module fails with correct msg
|
- name: Check module fails with correct msg
|
||||||
tower_group:
|
group:
|
||||||
name: test-group
|
name: test-group
|
||||||
description: Group Description
|
description: Group Description
|
||||||
inventory: test-non-existing-inventory
|
inventory: test-non-existing-inventory
|
||||||
@@ -149,7 +149,7 @@
|
|||||||
- "result.total_results == 0"
|
- "result.total_results == 0"
|
||||||
|
|
||||||
- name: add hosts
|
- name: add hosts
|
||||||
tower_host:
|
host:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
inventory: "{{ inv_name }}"
|
inventory: "{{ inv_name }}"
|
||||||
loop:
|
loop:
|
||||||
@@ -158,14 +158,14 @@
|
|||||||
- "{{ host_name3 }}"
|
- "{{ host_name3 }}"
|
||||||
|
|
||||||
- name: add mid level group
|
- name: add mid level group
|
||||||
tower_group:
|
group:
|
||||||
name: "{{ group_name2 }}"
|
name: "{{ group_name2 }}"
|
||||||
inventory: "{{ inv_name }}"
|
inventory: "{{ inv_name }}"
|
||||||
hosts:
|
hosts:
|
||||||
- "{{ host_name3 }}"
|
- "{{ host_name3 }}"
|
||||||
|
|
||||||
- name: add top group
|
- name: add top group
|
||||||
tower_group:
|
group:
|
||||||
name: "{{ group_name3 }}"
|
name: "{{ group_name3 }}"
|
||||||
inventory: "{{ inv_name }}"
|
inventory: "{{ inv_name }}"
|
||||||
hosts:
|
hosts:
|
||||||
@@ -175,19 +175,19 @@
|
|||||||
- "{{ group_name2 }}"
|
- "{{ group_name2 }}"
|
||||||
|
|
||||||
- name: Delete the parent group
|
- name: Delete the parent group
|
||||||
tower_group:
|
group:
|
||||||
name: "{{ group_name3 }}"
|
name: "{{ group_name3 }}"
|
||||||
inventory: "{{ inv_name }}"
|
inventory: "{{ inv_name }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: Delete the child group
|
- name: Delete the child group
|
||||||
tower_group:
|
group:
|
||||||
name: "{{ group_name2 }}"
|
name: "{{ group_name2 }}"
|
||||||
inventory: "{{ inv_name }}"
|
inventory: "{{ inv_name }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: Delete an Inventory
|
- name: Delete an Inventory
|
||||||
tower_inventory:
|
inventory:
|
||||||
name: "{{ inv_name }}"
|
name: "{{ inv_name }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: absent
|
state: absent
|
||||||
|
|||||||
@@ -5,14 +5,14 @@
|
|||||||
inv_name: "AWX-Collection-tests-tower_host-inv-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
|
inv_name: "AWX-Collection-tests-tower_host-inv-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
|
||||||
|
|
||||||
- name: Create an Inventory
|
- name: Create an Inventory
|
||||||
tower_inventory:
|
inventory:
|
||||||
name: "{{ inv_name }}"
|
name: "{{ inv_name }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: present
|
state: present
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Create a Host
|
- name: Create a Host
|
||||||
tower_host:
|
host:
|
||||||
name: "{{ host_name }}"
|
name: "{{ host_name }}"
|
||||||
inventory: "{{ result.id }}"
|
inventory: "{{ result.id }}"
|
||||||
state: present
|
state: present
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Delete a Host
|
- name: Delete a Host
|
||||||
tower_host:
|
host:
|
||||||
name: "{{ result.id }}"
|
name: "{{ result.id }}"
|
||||||
inventory: "{{ inv_name }}"
|
inventory: "{{ inv_name }}"
|
||||||
state: absent
|
state: absent
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Check module fails with correct msg
|
- name: Check module fails with correct msg
|
||||||
tower_host:
|
host:
|
||||||
name: test-host
|
name: test-host
|
||||||
description: Host Description
|
description: Host Description
|
||||||
inventory: test-non-existing-inventory
|
inventory: test-non-existing-inventory
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: "Import something"
|
- name: "Import something"
|
||||||
tower_import:
|
import:
|
||||||
assets:
|
assets:
|
||||||
organizations:
|
organizations:
|
||||||
- name: "{{ org_name1 }}"
|
- name: "{{ org_name1 }}"
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
- import_output is changed
|
- import_output is changed
|
||||||
|
|
||||||
- name: "Import the same thing again"
|
- name: "Import the same thing again"
|
||||||
tower_import:
|
import:
|
||||||
assets:
|
assets:
|
||||||
organizations:
|
organizations:
|
||||||
- name: "{{ org_name1 }}"
|
- name: "{{ org_name1 }}"
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
dest: ./org.json
|
dest: ./org.json
|
||||||
|
|
||||||
- name: "Load assets from a file"
|
- name: "Load assets from a file"
|
||||||
tower_import:
|
import:
|
||||||
assets: "{{ lookup('file', 'org.json') | from_json() }}"
|
assets: "{{ lookup('file', 'org.json') | from_json() }}"
|
||||||
register: import_output
|
register: import_output
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
|
|
||||||
always:
|
always:
|
||||||
- name: Remove organizations
|
- name: Remove organizations
|
||||||
tower_organization:
|
organization:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: absent
|
state: absent
|
||||||
loop:
|
loop:
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: Create an OpenShift Credential
|
- name: Create an OpenShift Credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ cred_name1 }}"
|
name: "{{ cred_name1 }}"
|
||||||
organization: "Default"
|
organization: "Default"
|
||||||
credential_type: "OpenShift or Kubernetes API Bearer Token"
|
credential_type: "OpenShift or Kubernetes API Bearer Token"
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
- "{{ group_name2 }}"
|
- "{{ group_name2 }}"
|
||||||
|
|
||||||
- name: Delete the credential
|
- name: Delete the credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ cred_name1 }}"
|
name: "{{ cred_name1 }}"
|
||||||
organization: "Default"
|
organization: "Default"
|
||||||
credential_type: "OpenShift or Kubernetes API Bearer Token"
|
credential_type: "OpenShift or Kubernetes API Bearer Token"
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Create an Insights Credential
|
- name: Create an Insights Credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ cred_name1 }}"
|
name: "{{ cred_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
kind: insights
|
kind: insights
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Create an Inventory
|
- name: Create an Inventory
|
||||||
tower_inventory:
|
inventory:
|
||||||
name: "{{ inv_name1 }}"
|
name: "{{ inv_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
insights_credential: "{{ result.id }}"
|
insights_credential: "{{ result.id }}"
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Test Inventory module idempotency
|
- name: Test Inventory module idempotency
|
||||||
tower_inventory:
|
inventory:
|
||||||
name: "{{ result.id }}"
|
name: "{{ result.id }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
insights_credential: "{{ cred_name1 }}"
|
insights_credential: "{{ cred_name1 }}"
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
- "result is not changed"
|
- "result is not changed"
|
||||||
|
|
||||||
- name: Copy an inventory
|
- name: Copy an inventory
|
||||||
tower_inventory:
|
inventory:
|
||||||
name: "copy_{{ inv_name1 }}"
|
name: "copy_{{ inv_name1 }}"
|
||||||
copy_from: "{{ inv_name1 }}"
|
copy_from: "{{ inv_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
- result.copied
|
- result.copied
|
||||||
|
|
||||||
- name: Delete an Inventory
|
- name: Delete an Inventory
|
||||||
tower_inventory:
|
inventory:
|
||||||
name: "copy_{{ inv_name1 }}"
|
name: "copy_{{ inv_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: absent
|
state: absent
|
||||||
@@ -88,7 +88,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Fail Change Regular to Smart
|
- name: Fail Change Regular to Smart
|
||||||
tower_inventory:
|
inventory:
|
||||||
name: "{{ inv_name1 }}"
|
name: "{{ inv_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
kind: smart
|
kind: smart
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
- "result is failed"
|
- "result is failed"
|
||||||
|
|
||||||
- name: Create a smart inventory
|
- name: Create a smart inventory
|
||||||
tower_inventory:
|
inventory:
|
||||||
name: "{{ inv_name2 }}"
|
name: "{{ inv_name2 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
kind: smart
|
kind: smart
|
||||||
@@ -112,7 +112,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Delete a smart inventory
|
- name: Delete a smart inventory
|
||||||
tower_inventory:
|
inventory:
|
||||||
name: "{{ inv_name2 }}"
|
name: "{{ inv_name2 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
kind: smart
|
kind: smart
|
||||||
@@ -125,7 +125,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Delete an Inventory
|
- name: Delete an Inventory
|
||||||
tower_inventory:
|
inventory:
|
||||||
name: "{{ inv_name1 }}"
|
name: "{{ inv_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: absent
|
state: absent
|
||||||
@@ -136,7 +136,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Delete a Non-Existent Inventory
|
- name: Delete a Non-Existent Inventory
|
||||||
tower_inventory:
|
inventory:
|
||||||
name: "{{ inv_name1 }}"
|
name: "{{ inv_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: absent
|
state: absent
|
||||||
@@ -147,7 +147,7 @@
|
|||||||
- "result is not changed"
|
- "result is not changed"
|
||||||
|
|
||||||
- name: Check module fails with correct msg
|
- name: Check module fails with correct msg
|
||||||
tower_inventory:
|
inventory:
|
||||||
name: test-inventory
|
name: test-inventory
|
||||||
description: Inventory Description
|
description: Inventory Description
|
||||||
organization: test-non-existing-org
|
organization: test-non-existing-org
|
||||||
@@ -164,7 +164,7 @@
|
|||||||
|
|
||||||
always:
|
always:
|
||||||
- name: Delete Inventories
|
- name: Delete Inventories
|
||||||
tower_inventory:
|
inventory:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: absent
|
state: absent
|
||||||
@@ -179,7 +179,7 @@
|
|||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: Delete Insights Credential
|
- name: Delete Insights Credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ cred_name1 }}"
|
name: "{{ cred_name1 }}"
|
||||||
organization: "Default"
|
organization: "Default"
|
||||||
kind: insights
|
kind: insights
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
openstack_inv_source: "AWX-Collection-tests-tower_inventory_source-inv-source-openstack-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
|
openstack_inv_source: "AWX-Collection-tests-tower_inventory_source-inv-source-openstack-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
|
||||||
|
|
||||||
- name: Add a Tower credential
|
- name: Add a Tower credential
|
||||||
tower_credential:
|
credential:
|
||||||
description: Credentials for Openstack Test project
|
description: Credentials for Openstack Test project
|
||||||
name: "{{ openstack_cred }}"
|
name: "{{ openstack_cred }}"
|
||||||
kind: openstack
|
kind: openstack
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
register: credential_result
|
register: credential_result
|
||||||
|
|
||||||
- name: Add a Tower inventory
|
- name: Add a Tower inventory
|
||||||
tower_inventory:
|
inventory:
|
||||||
description: Test inventory
|
description: Test inventory
|
||||||
organization: Default
|
organization: Default
|
||||||
name: "{{ openstack_inv }}"
|
name: "{{ openstack_inv }}"
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Delete the credential
|
- name: Delete the credential
|
||||||
tower_credential:
|
credential:
|
||||||
description: Credentials for Openstack Test project
|
description: Credentials for Openstack Test project
|
||||||
name: "{{ openstack_cred }}"
|
name: "{{ openstack_cred }}"
|
||||||
kind: openstack
|
kind: openstack
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Delete the inventory
|
- name: Delete the inventory
|
||||||
tower_inventory:
|
inventory:
|
||||||
description: Test inventory
|
description: Test inventory
|
||||||
organization: Default
|
organization: Default
|
||||||
name: "{{ openstack_inv }}"
|
name: "{{ openstack_inv }}"
|
||||||
|
|||||||
@@ -16,12 +16,12 @@
|
|||||||
- block:
|
- block:
|
||||||
|
|
||||||
- name: "Create a new organization"
|
- name: "Create a new organization"
|
||||||
tower_organization:
|
organization:
|
||||||
name: "{{ org_name }}"
|
name: "{{ org_name }}"
|
||||||
register: created_org
|
register: created_org
|
||||||
|
|
||||||
- name: Create a git project without credentials
|
- name: Create a git project without credentials
|
||||||
tower_project:
|
project:
|
||||||
name: "{{ project_name }}"
|
name: "{{ project_name }}"
|
||||||
organization: "{{ org_name }}"
|
organization: "{{ org_name }}"
|
||||||
scm_type: git
|
scm_type: git
|
||||||
@@ -29,13 +29,13 @@
|
|||||||
wait: true
|
wait: true
|
||||||
|
|
||||||
- name: Create an Inventory
|
- name: Create an Inventory
|
||||||
tower_inventory:
|
inventory:
|
||||||
name: "{{ inv_name }}"
|
name: "{{ inv_name }}"
|
||||||
organization: "{{ org_name }}"
|
organization: "{{ org_name }}"
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Create another inventory w/ same name, different org
|
- name: Create another inventory w/ same name, different org
|
||||||
tower_inventory:
|
inventory:
|
||||||
name: "{{ inv_name }}"
|
name: "{{ inv_name }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: present
|
state: present
|
||||||
@@ -114,18 +114,18 @@
|
|||||||
|
|
||||||
always:
|
always:
|
||||||
- name: Delete Inventory
|
- name: Delete Inventory
|
||||||
tower_inventory:
|
inventory:
|
||||||
name: "{{ inv_name }}"
|
name: "{{ inv_name }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: Delete Project
|
- name: Delete Project
|
||||||
tower_project:
|
project:
|
||||||
name: "{{ project_name }}"
|
name: "{{ project_name }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: "Remove the organization"
|
- name: "Remove the organization"
|
||||||
tower_organization:
|
organization:
|
||||||
name: "{{ org_name }}"
|
name: "{{ org_name }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
|||||||
@@ -70,7 +70,7 @@
|
|||||||
- "result.status == 'pending'"
|
- "result.status == 'pending'"
|
||||||
|
|
||||||
- name: Create a project for testing extra_vars
|
- name: Create a project for testing extra_vars
|
||||||
tower_project:
|
project:
|
||||||
name: "{{ proj_name }}"
|
name: "{{ proj_name }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
scm_type: git
|
scm_type: git
|
||||||
@@ -216,7 +216,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Delete the extra_vars project
|
- name: Delete the extra_vars project
|
||||||
tower_project:
|
project:
|
||||||
name: "{{ proj_name }}"
|
name: "{{ proj_name }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: absent
|
state: absent
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Create a Demo Project
|
- name: Create a Demo Project
|
||||||
tower_project:
|
project:
|
||||||
name: "{{ proj1 }}"
|
name: "{{ proj1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: present
|
state: present
|
||||||
@@ -34,20 +34,20 @@
|
|||||||
register: proj_result
|
register: proj_result
|
||||||
|
|
||||||
- name: Create Credential1
|
- name: Create Credential1
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ cred1 }}"
|
name: "{{ cred1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
kind: tower
|
kind: tower
|
||||||
register: cred1_result
|
register: cred1_result
|
||||||
|
|
||||||
- name: Create Credential2
|
- name: Create Credential2
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ cred2 }}"
|
name: "{{ cred2 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
kind: ssh
|
kind: ssh
|
||||||
|
|
||||||
- name: Create Credential3
|
- name: Create Credential3
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ cred3 }}"
|
name: "{{ cred3 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
kind: ssh
|
kind: ssh
|
||||||
@@ -374,7 +374,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Delete the Demo Project
|
- name: Delete the Demo Project
|
||||||
tower_project:
|
project:
|
||||||
name: "{{ proj1 }}"
|
name: "{{ proj1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: absent
|
state: absent
|
||||||
@@ -383,21 +383,21 @@
|
|||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Delete Credential1
|
- name: Delete Credential1
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ cred1 }}"
|
name: "{{ cred1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
kind: tower
|
kind: tower
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: Delete Credential2
|
- name: Delete Credential2
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ cred2 }}"
|
name: "{{ cred2 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
kind: ssh
|
kind: ssh
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: Delete Credential3
|
- name: Delete Credential3
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ cred3 }}"
|
name: "{{ cred3 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
kind: ssh
|
kind: ssh
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
proj_name: "AWX-Collection-tests-tower_job_wait-long_running-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
|
proj_name: "AWX-Collection-tests-tower_job_wait-long_running-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
|
||||||
|
|
||||||
- name: Assure that the demo project exists
|
- name: Assure that the demo project exists
|
||||||
tower_project:
|
project:
|
||||||
name: "{{ proj_name }}"
|
name: "{{ proj_name }}"
|
||||||
scm_type: 'git'
|
scm_type: 'git'
|
||||||
scm_url: 'https://github.com/ansible/test-playbooks.git'
|
scm_url: 'https://github.com/ansible/test-playbooks.git'
|
||||||
@@ -131,7 +131,7 @@
|
|||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: Delete the project
|
- name: Delete the project
|
||||||
tower_project:
|
project:
|
||||||
name: "{{ proj_name }}"
|
name: "{{ proj_name }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: absent
|
state: absent
|
||||||
|
|||||||
@@ -4,13 +4,13 @@
|
|||||||
label_name: "AWX-Collection-tests-tower_label-label-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
|
label_name: "AWX-Collection-tests-tower_label-label-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
|
||||||
|
|
||||||
- name: Create a Label
|
- name: Create a Label
|
||||||
tower_label:
|
label:
|
||||||
name: "{{ label_name }}"
|
name: "{{ label_name }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Check module fails with correct msg
|
- name: Check module fails with correct msg
|
||||||
tower_label:
|
label:
|
||||||
name: "Test Label"
|
name: "Test Label"
|
||||||
organization: "Non_existing_org"
|
organization: "Non_existing_org"
|
||||||
state: present
|
state: present
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
group_name: "AWX-Collection-tests-tower_api_lookup-group1-{{ test_id }}"
|
group_name: "AWX-Collection-tests-tower_api_lookup-group1-{{ test_id }}"
|
||||||
|
|
||||||
- name: Get our collection package
|
- name: Get our collection package
|
||||||
tower_meta:
|
meta:
|
||||||
register: tower_meta
|
register: tower_meta
|
||||||
|
|
||||||
- name: Generate the name of our plugin
|
- name: Generate the name of our plugin
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
plugin_name: "{{ tower_meta.prefix }}.tower_api"
|
plugin_name: "{{ tower_meta.prefix }}.tower_api"
|
||||||
|
|
||||||
- name: Create all of our users
|
- name: Create all of our users
|
||||||
tower_user:
|
user:
|
||||||
username: "{{ item }}"
|
username: "{{ item }}"
|
||||||
is_superuser: true
|
is_superuser: true
|
||||||
password: "{{ test_id }}"
|
password: "{{ test_id }}"
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
- "'DNE' in results.msg"
|
- "'DNE' in results.msg"
|
||||||
|
|
||||||
- name: Create our hosts
|
- name: Create our hosts
|
||||||
tower_host:
|
host:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
inventory: "Demo Inventory"
|
inventory: "Demo Inventory"
|
||||||
loop: "{{ hosts }}"
|
loop: "{{ hosts }}"
|
||||||
@@ -200,7 +200,7 @@
|
|||||||
label: "{{ item['name'] }}"
|
label: "{{ item['name'] }}"
|
||||||
|
|
||||||
- name: Make sure user 'john' is an org admin of the default org if the user exists
|
- name: Make sure user 'john' is an org admin of the default org if the user exists
|
||||||
tower_role:
|
role:
|
||||||
organization: Default
|
organization: Default
|
||||||
role: admin
|
role: admin
|
||||||
user: "{{ usernames[0] }}"
|
user: "{{ usernames[0] }}"
|
||||||
@@ -213,7 +213,7 @@
|
|||||||
- tower_role_revoke is skipped
|
- tower_role_revoke is skipped
|
||||||
|
|
||||||
- name: Create an inventory group with all 'foo' hosts
|
- name: Create an inventory group with all 'foo' hosts
|
||||||
tower_group:
|
group:
|
||||||
name: "{{ group_name }}"
|
name: "{{ group_name }}"
|
||||||
inventory: "Demo Inventory"
|
inventory: "Demo Inventory"
|
||||||
hosts: >-
|
hosts: >-
|
||||||
@@ -229,20 +229,20 @@
|
|||||||
|
|
||||||
always:
|
always:
|
||||||
- name: Cleanup group
|
- name: Cleanup group
|
||||||
tower_group:
|
group:
|
||||||
name: "{{ group_name }}"
|
name: "{{ group_name }}"
|
||||||
inventory: "Demo Inventory"
|
inventory: "Demo Inventory"
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: Cleanup hosts
|
- name: Cleanup hosts
|
||||||
tower_host:
|
host:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
inventory: "Demo Inventory"
|
inventory: "Demo Inventory"
|
||||||
state: absent
|
state: absent
|
||||||
loop: "{{ hosts }}"
|
loop: "{{ hosts }}"
|
||||||
|
|
||||||
- name: Cleanup users
|
- name: Cleanup users
|
||||||
tower_user:
|
user:
|
||||||
username: "{{ item }}"
|
username: "{{ item }}"
|
||||||
state: absent
|
state: absent
|
||||||
loop: "{{ usernames }}"
|
loop: "{{ usernames }}"
|
||||||
|
|||||||
@@ -9,13 +9,13 @@
|
|||||||
group_name1: "AWX-Collection-tests-tower_instance_group-group1-{{ test_id }}"
|
group_name1: "AWX-Collection-tests-tower_instance_group-group1-{{ test_id }}"
|
||||||
|
|
||||||
- name: Make sure {{ org_name }} is not there
|
- name: Make sure {{ org_name }} is not there
|
||||||
tower_organization:
|
organization:
|
||||||
name: "{{ org_name }}"
|
name: "{{ org_name }}"
|
||||||
state: absent
|
state: absent
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: "Create a new organization"
|
- name: "Create a new organization"
|
||||||
tower_organization:
|
organization:
|
||||||
name: "{{ org_name }}"
|
name: "{{ org_name }}"
|
||||||
galaxy_credentials:
|
galaxy_credentials:
|
||||||
- Ansible Galaxy
|
- Ansible Galaxy
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
that: "result is changed"
|
that: "result is changed"
|
||||||
|
|
||||||
- name: "Make sure making the same org is not a change"
|
- name: "Make sure making the same org is not a change"
|
||||||
tower_organization:
|
organization:
|
||||||
name: "{{ org_name }}"
|
name: "{{ org_name }}"
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: "Pass in all parameters"
|
- name: "Pass in all parameters"
|
||||||
tower_organization:
|
organization:
|
||||||
name: "{{ org_name }}"
|
name: "{{ org_name }}"
|
||||||
description: "A description"
|
description: "A description"
|
||||||
instance_groups:
|
instance_groups:
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: "Change the description"
|
- name: "Change the description"
|
||||||
tower_organization:
|
organization:
|
||||||
name: "{{ org_name }}"
|
name: "{{ org_name }}"
|
||||||
description: "A new description"
|
description: "A new description"
|
||||||
register: result
|
register: result
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: "Remove the organization"
|
- name: "Remove the organization"
|
||||||
tower_organization:
|
organization:
|
||||||
name: "{{ org_name }}"
|
name: "{{ org_name }}"
|
||||||
state: absent
|
state: absent
|
||||||
register: result
|
register: result
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: "Remove a missing organization"
|
- name: "Remove a missing organization"
|
||||||
tower_organization:
|
organization:
|
||||||
name: "{{ org_name }}"
|
name: "{{ org_name }}"
|
||||||
state: absent
|
state: absent
|
||||||
register: result
|
register: result
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
|
|
||||||
# Test behaviour common to all tower modules
|
# Test behaviour common to all tower modules
|
||||||
- name: Check that SSL is available and verify_ssl is enabled (task must fail)
|
- name: Check that SSL is available and verify_ssl is enabled (task must fail)
|
||||||
tower_organization:
|
organization:
|
||||||
name: Default
|
name: Default
|
||||||
validate_certs: true
|
validate_certs: true
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
@@ -104,6 +104,6 @@
|
|||||||
- "'CERTIFICATE_VERIFY_FAILED' in check_ssl_is_used['msg']"
|
- "'CERTIFICATE_VERIFY_FAILED' in check_ssl_is_used['msg']"
|
||||||
|
|
||||||
- name: Check that verify_ssl is disabled (task must not fail)
|
- name: Check that verify_ssl is disabled (task must not fail)
|
||||||
tower_organization:
|
organization:
|
||||||
name: Default
|
name: Default
|
||||||
validate_certs: false
|
validate_certs: false
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: Create an SCM Credential
|
- name: Create an SCM Credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ scm_cred_name }}"
|
name: "{{ scm_cred_name }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
kind: scm
|
kind: scm
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
- result is changed
|
- result is changed
|
||||||
|
|
||||||
- name: Create a git project without credentials and wait
|
- name: Create a git project without credentials and wait
|
||||||
tower_project:
|
project:
|
||||||
name: "{{ project_name1 }}"
|
name: "{{ project_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
scm_type: git
|
scm_type: git
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
- result is changed
|
- result is changed
|
||||||
|
|
||||||
- name: Recreate the project to validate not changed
|
- name: Recreate the project to validate not changed
|
||||||
tower_project:
|
project:
|
||||||
name: "{{ project_name1 }}"
|
name: "{{ project_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
scm_type: git
|
scm_type: git
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
- result is not changed
|
- result is not changed
|
||||||
|
|
||||||
- name: Create organizations
|
- name: Create organizations
|
||||||
tower_organization:
|
organization:
|
||||||
name: "{{ org_name }}"
|
name: "{{ org_name }}"
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
- result is changed
|
- result is changed
|
||||||
|
|
||||||
- name: Create credential
|
- name: Create credential
|
||||||
tower_credential:
|
credential:
|
||||||
kind: scm
|
kind: scm
|
||||||
name: "{{ cred_name }}"
|
name: "{{ cred_name }}"
|
||||||
organization: "{{ org_name }}"
|
organization: "{{ org_name }}"
|
||||||
@@ -69,7 +69,7 @@
|
|||||||
- result is changed
|
- result is changed
|
||||||
|
|
||||||
- name: Create a new test project in check_mode
|
- name: Create a new test project in check_mode
|
||||||
tower_project:
|
project:
|
||||||
name: "{{ project_name2 }}"
|
name: "{{ project_name2 }}"
|
||||||
organization: "{{ org_name }}"
|
organization: "{{ org_name }}"
|
||||||
scm_type: git
|
scm_type: git
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
check_mode: true
|
check_mode: true
|
||||||
|
|
||||||
- name: "Copy tower project from {{ project_name1 }}"
|
- name: "Copy tower project from {{ project_name1 }}"
|
||||||
tower_project:
|
project:
|
||||||
name: "{{ project_name2 }}"
|
name: "{{ project_name2 }}"
|
||||||
copy_from: "{{ project_name1 }}"
|
copy_from: "{{ project_name1 }}"
|
||||||
organization: "{{ org_name }}"
|
organization: "{{ org_name }}"
|
||||||
@@ -94,7 +94,7 @@
|
|||||||
- result.copied
|
- result.copied
|
||||||
|
|
||||||
- name: Check module fails with correct msg when given non-existing org as param
|
- name: Check module fails with correct msg when given non-existing org as param
|
||||||
tower_project:
|
project:
|
||||||
name: "{{ project_name2 }}"
|
name: "{{ project_name2 }}"
|
||||||
organization: Non_Existing_Org
|
organization: Non_Existing_Org
|
||||||
scm_type: git
|
scm_type: git
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
- "result.total_results == 0"
|
- "result.total_results == 0"
|
||||||
|
|
||||||
- name: Check module fails with correct msg when given non-existing credential as param
|
- name: Check module fails with correct msg when given non-existing credential as param
|
||||||
tower_project:
|
project:
|
||||||
name: "{{ project_name2 }}"
|
name: "{{ project_name2 }}"
|
||||||
organization: "{{ org_name }}"
|
organization: "{{ org_name }}"
|
||||||
scm_type: git
|
scm_type: git
|
||||||
@@ -128,7 +128,7 @@
|
|||||||
- "result.total_results == 0"
|
- "result.total_results == 0"
|
||||||
|
|
||||||
- name: Create a git project without credentials without waiting
|
- name: Create a git project without credentials without waiting
|
||||||
tower_project:
|
project:
|
||||||
name: "{{ project_name3 }}"
|
name: "{{ project_name3 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
scm_type: git
|
scm_type: git
|
||||||
@@ -142,7 +142,7 @@
|
|||||||
- result is changed
|
- result is changed
|
||||||
|
|
||||||
- name: Update the project and wait. Verify not changed as no change made to repo and refspec not changed
|
- name: Update the project and wait. Verify not changed as no change made to repo and refspec not changed
|
||||||
tower_project:
|
project:
|
||||||
name: "{{ project_name3 }}"
|
name: "{{ project_name3 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
scm_type: git
|
scm_type: git
|
||||||
@@ -192,19 +192,19 @@
|
|||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: Delete the test project 3
|
- name: Delete the test project 3
|
||||||
tower_project:
|
project:
|
||||||
name: "{{ project_name3 }}"
|
name: "{{ project_name3 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: Delete the test project 2
|
- name: Delete the test project 2
|
||||||
tower_project:
|
project:
|
||||||
name: "{{ project_name2 }}"
|
name: "{{ project_name2 }}"
|
||||||
organization: "{{ org_name }}"
|
organization: "{{ org_name }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: Delete the SCM Credential
|
- name: Delete the SCM Credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ scm_cred_name }}"
|
name: "{{ scm_cred_name }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
kind: scm
|
kind: scm
|
||||||
@@ -216,7 +216,7 @@
|
|||||||
- result is changed
|
- result is changed
|
||||||
|
|
||||||
- name: Delete the test project 1
|
- name: Delete the test project 1
|
||||||
tower_project:
|
project:
|
||||||
name: "{{ project_name1 }}"
|
name: "{{ project_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: absent
|
state: absent
|
||||||
@@ -227,7 +227,7 @@
|
|||||||
- result is changed
|
- result is changed
|
||||||
|
|
||||||
- name: Delete credential
|
- name: Delete credential
|
||||||
tower_credential:
|
credential:
|
||||||
kind: scm
|
kind: scm
|
||||||
name: "{{ cred_name }}"
|
name: "{{ cred_name }}"
|
||||||
organization: "{{ org_name }}"
|
organization: "{{ org_name }}"
|
||||||
@@ -239,7 +239,7 @@
|
|||||||
- result is changed
|
- result is changed
|
||||||
|
|
||||||
- name: Delete the organization
|
- name: Delete the organization
|
||||||
tower_organization:
|
organization:
|
||||||
name: "{{ org_name }}"
|
name: "{{ org_name }}"
|
||||||
state: absent
|
state: absent
|
||||||
register: result
|
register: result
|
||||||
|
|||||||
@@ -5,18 +5,18 @@
|
|||||||
vars:
|
vars:
|
||||||
tower_settings: "{{ lookup('awx.awx.tower_api', 'config/') }}"
|
tower_settings: "{{ lookup('awx.awx.tower_api', 'config/') }}"
|
||||||
|
|
||||||
- tower_inventory:
|
- inventory:
|
||||||
name: localhost
|
name: localhost
|
||||||
organization: Default
|
organization: Default
|
||||||
|
|
||||||
- tower_host:
|
- host:
|
||||||
name: localhost
|
name: localhost
|
||||||
inventory: localhost
|
inventory: localhost
|
||||||
variables:
|
variables:
|
||||||
ansible_connection: local
|
ansible_connection: local
|
||||||
|
|
||||||
- name: create an unused SSH / Machine credential
|
- name: create an unused SSH / Machine credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: dummy
|
name: dummy
|
||||||
kind: ssh
|
kind: ssh
|
||||||
ssh_key_data: |
|
ssh_key_data: |
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: Add a path to a setting
|
- name: Add a path to a setting
|
||||||
tower_settings:
|
settings:
|
||||||
name: AWX_ISOLATION_SHOW_PATHS
|
name: AWX_ISOLATION_SHOW_PATHS
|
||||||
value: "[{{ project_base_dir }}]"
|
value: "[{{ project_base_dir }}]"
|
||||||
|
|
||||||
@@ -44,12 +44,12 @@
|
|||||||
|
|
||||||
always:
|
always:
|
||||||
- name: Delete path from setting
|
- name: Delete path from setting
|
||||||
tower_settings:
|
settings:
|
||||||
name: AWX_ISOLATION_SHOW_PATHS
|
name: AWX_ISOLATION_SHOW_PATHS
|
||||||
value: []
|
value: []
|
||||||
|
|
||||||
- name: Delete dummy credential
|
- name: Delete dummy credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: dummy
|
name: dummy
|
||||||
kind: ssh
|
kind: ssh
|
||||||
state: absent
|
state: absent
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
import_tasks: create_project_dir.yml
|
import_tasks: create_project_dir.yml
|
||||||
|
|
||||||
- name: Create a manual project
|
- name: Create a manual project
|
||||||
tower_project:
|
project:
|
||||||
name: "{{ project_name }}"
|
name: "{{ project_name }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
scm_type: manual
|
scm_type: manual
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Delete a manual project
|
- name: Delete a manual project
|
||||||
tower_project:
|
project:
|
||||||
name: "{{ project_name }}"
|
name: "{{ project_name }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: absent
|
state: absent
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
project_name1: "AWX-Collection-tests-tower_project_update-project-{{ test_id }}"
|
project_name1: "AWX-Collection-tests-tower_project_update-project-{{ test_id }}"
|
||||||
|
|
||||||
- name: Create a git project without credentials without waiting
|
- name: Create a git project without credentials without waiting
|
||||||
tower_project:
|
project:
|
||||||
name: "{{ project_name1 }}"
|
name: "{{ project_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
scm_type: git
|
scm_type: git
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
- result is not changed
|
- result is not changed
|
||||||
|
|
||||||
- name: Delete the test project 1
|
- name: Delete the test project 1
|
||||||
tower_project:
|
project:
|
||||||
name: "{{ project_name1 }}"
|
name: "{{ project_name1 }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: absent
|
state: absent
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: Create a User
|
- name: Create a User
|
||||||
tower_user:
|
user:
|
||||||
first_name: Joe
|
first_name: Joe
|
||||||
last_name: User
|
last_name: User
|
||||||
username: "{{ username }}"
|
username: "{{ username }}"
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Create a project
|
- name: Create a project
|
||||||
tower_project:
|
project:
|
||||||
name: "{{ project_name }}"
|
name: "{{ project_name }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
scm_type: git
|
scm_type: git
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Add Joe to the update role of the default Project with lookup Organization
|
- name: Add Joe to the update role of the default Project with lookup Organization
|
||||||
tower_role:
|
role:
|
||||||
user: "{{ username }}"
|
user: "{{ username }}"
|
||||||
role: update
|
role: update
|
||||||
lookup_organization: Default
|
lookup_organization: Default
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Add Joe to the new project by ID
|
- name: Add Joe to the new project by ID
|
||||||
tower_role:
|
role:
|
||||||
user: "{{ username }}"
|
user: "{{ username }}"
|
||||||
role: update
|
role: update
|
||||||
project: "{{ project_info['id'] }}"
|
project: "{{ project_info['id'] }}"
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Add Joe to workflow execute role
|
- name: Add Joe to workflow execute role
|
||||||
tower_role:
|
role:
|
||||||
user: "{{ username }}"
|
user: "{{ username }}"
|
||||||
role: execute
|
role: execute
|
||||||
workflow: test-role-workflow
|
workflow: test-role-workflow
|
||||||
@@ -107,7 +107,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Add Joe to workflow execute role, no-op
|
- name: Add Joe to workflow execute role, no-op
|
||||||
tower_role:
|
role:
|
||||||
user: "{{ username }}"
|
user: "{{ username }}"
|
||||||
role: execute
|
role: execute
|
||||||
workflow: test-role-workflow
|
workflow: test-role-workflow
|
||||||
@@ -119,7 +119,7 @@
|
|||||||
- "result is not changed"
|
- "result is not changed"
|
||||||
|
|
||||||
- name: Add Joe to workflow approve role
|
- name: Add Joe to workflow approve role
|
||||||
tower_role:
|
role:
|
||||||
user: "{{ username }}"
|
user: "{{ username }}"
|
||||||
role: approval
|
role: approval
|
||||||
workflow: test-role-workflow
|
workflow: test-role-workflow
|
||||||
@@ -132,7 +132,7 @@
|
|||||||
|
|
||||||
always:
|
always:
|
||||||
- name: Delete a User
|
- name: Delete a User
|
||||||
tower_user:
|
user:
|
||||||
username: "{{ username }}"
|
username: "{{ username }}"
|
||||||
email: joe@example.org
|
email: joe@example.org
|
||||||
state: absent
|
state: absent
|
||||||
@@ -151,7 +151,7 @@
|
|||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Delete the project
|
- name: Delete the project
|
||||||
tower_project:
|
project:
|
||||||
name: "{{ project_name }}"
|
name: "{{ project_name }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: absent
|
state: absent
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
sched1: "AWX-Collection-tests-tower_schedule-sched1-{{ test_id }}"
|
sched1: "AWX-Collection-tests-tower_schedule-sched1-{{ test_id }}"
|
||||||
|
|
||||||
- name: Try to create without an rrule
|
- name: Try to create without an rrule
|
||||||
tower_schedule:
|
schedule:
|
||||||
name: "{{ sched1 }}"
|
name: "{{ sched1 }}"
|
||||||
state: present
|
state: present
|
||||||
unified_job_template: "Demo Job Template"
|
unified_job_template: "Demo Job Template"
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
- "'Unable to create schedule {{ sched1 }}' in result.msg"
|
- "'Unable to create schedule {{ sched1 }}' in result.msg"
|
||||||
|
|
||||||
- name: Create with options that the JT does not support
|
- name: Create with options that the JT does not support
|
||||||
tower_schedule:
|
schedule:
|
||||||
name: "{{ sched1 }}"
|
name: "{{ sched1 }}"
|
||||||
state: present
|
state: present
|
||||||
unified_job_template: "Demo Job Template"
|
unified_job_template: "Demo Job Template"
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
- "'Unable to create schedule {{ sched1 }}' in result.msg"
|
- "'Unable to create schedule {{ sched1 }}' in result.msg"
|
||||||
|
|
||||||
- name: Build a real schedule
|
- name: Build a real schedule
|
||||||
tower_schedule:
|
schedule:
|
||||||
name: "{{ sched1 }}"
|
name: "{{ sched1 }}"
|
||||||
state: present
|
state: present
|
||||||
unified_job_template: "Demo Job Template"
|
unified_job_template: "Demo Job Template"
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
- result is changed
|
- result is changed
|
||||||
|
|
||||||
- name: Rebuild the same schedule
|
- name: Rebuild the same schedule
|
||||||
tower_schedule:
|
schedule:
|
||||||
name: "{{ sched1 }}"
|
name: "{{ sched1 }}"
|
||||||
state: present
|
state: present
|
||||||
unified_job_template: "Demo Job Template"
|
unified_job_template: "Demo Job Template"
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
- result is not changed
|
- result is not changed
|
||||||
|
|
||||||
- name: Disable a schedule
|
- name: Disable a schedule
|
||||||
tower_schedule:
|
schedule:
|
||||||
name: "{{ sched1 }}"
|
name: "{{ sched1 }}"
|
||||||
state: present
|
state: present
|
||||||
enabled: "false"
|
enabled: "false"
|
||||||
@@ -83,6 +83,6 @@
|
|||||||
- result is changed
|
- result is changed
|
||||||
|
|
||||||
- name: Delete the schedule
|
- name: Delete the schedule
|
||||||
tower_schedule:
|
schedule:
|
||||||
name: "{{ sched1 }}"
|
name: "{{ sched1 }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: Get our collection package
|
- name: Get our collection package
|
||||||
tower_meta:
|
meta:
|
||||||
register: tower_meta
|
register: tower_meta
|
||||||
|
|
||||||
- name: Generate the name of our plugin
|
- name: Generate the name of our plugin
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
---
|
---
|
||||||
- name: Set the value of AWX_ISOLATION_SHOW_PATHS to a baseline
|
- name: Set the value of AWX_ISOLATION_SHOW_PATHS to a baseline
|
||||||
tower_settings:
|
settings:
|
||||||
name: AWX_ISOLATION_SHOW_PATHS
|
name: AWX_ISOLATION_SHOW_PATHS
|
||||||
value: '["/var/lib/awx/projects/"]'
|
value: '["/var/lib/awx/projects/"]'
|
||||||
|
|
||||||
- name: Set the value of AWX_ISOLATION_SHOW_PATHS to get an error back from Tower
|
- name: Set the value of AWX_ISOLATION_SHOW_PATHS to get an error back from Tower
|
||||||
tower_settings:
|
settings:
|
||||||
settings:
|
settings:
|
||||||
AWX_ISOLATION_SHOW_PATHS:
|
AWX_ISOLATION_SHOW_PATHS:
|
||||||
'not': 'a valid'
|
'not': 'a valid'
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
- "result is failed"
|
- "result is failed"
|
||||||
|
|
||||||
- name: Set the value of AWX_ISOLATION_SHOW_PATHS
|
- name: Set the value of AWX_ISOLATION_SHOW_PATHS
|
||||||
tower_settings:
|
settings:
|
||||||
name: AWX_ISOLATION_SHOW_PATHS
|
name: AWX_ISOLATION_SHOW_PATHS
|
||||||
value: '["/var/lib/awx/projects/", "/tmp"]'
|
value: '["/var/lib/awx/projects/", "/tmp"]'
|
||||||
register: result
|
register: result
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Attempt to set the value of AWX_ISOLATION_BASE_PATH to what it already is
|
- name: Attempt to set the value of AWX_ISOLATION_BASE_PATH to what it already is
|
||||||
tower_settings:
|
settings:
|
||||||
name: AWX_ISOLATION_BASE_PATH
|
name: AWX_ISOLATION_BASE_PATH
|
||||||
value: /tmp
|
value: /tmp
|
||||||
register: result
|
register: result
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
- "result is not changed"
|
- "result is not changed"
|
||||||
|
|
||||||
- name: Apply a single setting via settings
|
- name: Apply a single setting via settings
|
||||||
tower_settings:
|
settings:
|
||||||
name: AWX_ISOLATION_SHOW_PATHS
|
name: AWX_ISOLATION_SHOW_PATHS
|
||||||
value: '["/var/lib/awx/projects/", "/var/tmp"]'
|
value: '["/var/lib/awx/projects/", "/var/tmp"]'
|
||||||
register: result
|
register: result
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Apply multiple setting via settings with no change
|
- name: Apply multiple setting via settings with no change
|
||||||
tower_settings:
|
settings:
|
||||||
settings:
|
settings:
|
||||||
AWX_ISOLATION_BASE_PATH: /tmp
|
AWX_ISOLATION_BASE_PATH: /tmp
|
||||||
AWX_ISOLATION_SHOW_PATHS: ["/var/lib/awx/projects/", "/var/tmp"]
|
AWX_ISOLATION_SHOW_PATHS: ["/var/lib/awx/projects/", "/var/tmp"]
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
- "result is not changed"
|
- "result is not changed"
|
||||||
|
|
||||||
- name: Apply multiple setting via settings with change
|
- name: Apply multiple setting via settings with change
|
||||||
tower_settings:
|
settings:
|
||||||
settings:
|
settings:
|
||||||
AWX_ISOLATION_BASE_PATH: /tmp
|
AWX_ISOLATION_BASE_PATH: /tmp
|
||||||
AWX_ISOLATION_SHOW_PATHS: []
|
AWX_ISOLATION_SHOW_PATHS: []
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Handle an omit value
|
- name: Handle an omit value
|
||||||
tower_settings:
|
settings:
|
||||||
name: AWX_ISOLATION_BASE_PATH
|
name: AWX_ISOLATION_BASE_PATH
|
||||||
value: '{{ junk_var | default(omit) }}'
|
value: '{{ junk_var | default(omit) }}'
|
||||||
register: result
|
register: result
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
team_name: "AWX-Collection-tests-tower_team-team-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
|
team_name: "AWX-Collection-tests-tower_team-team-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
|
||||||
|
|
||||||
- name: Attempt to add a Tower team to a non-existant Organization
|
- name: Attempt to add a Tower team to a non-existant Organization
|
||||||
tower_team:
|
team:
|
||||||
name: Test Team
|
name: Test Team
|
||||||
organization: Missing_Organization
|
organization: Missing_Organization
|
||||||
state: present
|
state: present
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
- "result.total_results == 0"
|
- "result.total_results == 0"
|
||||||
|
|
||||||
- name: Create a Tower team
|
- name: Create a Tower team
|
||||||
tower_team:
|
team:
|
||||||
name: "{{ team_name }}"
|
name: "{{ team_name }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
register: result
|
register: result
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Delete a Tower team
|
- name: Delete a Tower team
|
||||||
tower_team:
|
team:
|
||||||
name: "{{ team_name }}"
|
name: "{{ team_name }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: absent
|
state: absent
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Check module fails with correct msg
|
- name: Check module fails with correct msg
|
||||||
tower_team:
|
team:
|
||||||
name: "{{ team_name }}"
|
name: "{{ team_name }}"
|
||||||
organization: Non_Existing_Org
|
organization: Non_Existing_Org
|
||||||
state: present
|
state: present
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
- name: Try to use a token as a dict which is missing the token parameter
|
- name: Try to use a token as a dict which is missing the token parameter
|
||||||
tower_job_list:
|
tower_job_list:
|
||||||
tower_oauthtoken:
|
oauthtoken:
|
||||||
not_token: "This has no token entry"
|
not_token: "This has no token entry"
|
||||||
register: results
|
register: results
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
- name: Try to use a token as a list
|
- name: Try to use a token as a list
|
||||||
tower_job_list:
|
tower_job_list:
|
||||||
tower_oauthtoken:
|
oauthtoken:
|
||||||
- dummy_token
|
- dummy_token
|
||||||
register: results
|
register: results
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
- '"The provided tower_oauthtoken type was not valid (list). Valid options are str or dict." == results.msg'
|
- '"The provided tower_oauthtoken type was not valid (list). Valid options are str or dict." == results.msg'
|
||||||
|
|
||||||
- name: Try to delete a token with no existing_token or existing_token_id
|
- name: Try to delete a token with no existing_token or existing_token_id
|
||||||
tower_token:
|
token:
|
||||||
state: absent
|
state: absent
|
||||||
register: results
|
register: results
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
# We don't assert a message here because it's handled by ansible
|
# We don't assert a message here because it's handled by ansible
|
||||||
|
|
||||||
- name: Try to delete a token with both existing_token or existing_token_id
|
- name: Try to delete a token with both existing_token or existing_token_id
|
||||||
tower_token:
|
token:
|
||||||
existing_token:
|
existing_token:
|
||||||
id: 1234
|
id: 1234
|
||||||
existing_token_id: 1234
|
existing_token_id: 1234
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: Create a Token
|
- name: Create a Token
|
||||||
tower_token:
|
token:
|
||||||
description: '{{ token_description }}'
|
description: '{{ token_description }}'
|
||||||
scope: "write"
|
scope: "write"
|
||||||
state: present
|
state: present
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
|
|
||||||
always:
|
always:
|
||||||
- name: Delete our Token with our own token
|
- name: Delete our Token with our own token
|
||||||
tower_token:
|
token:
|
||||||
existing_token: "{{ tower_token }}"
|
existing_token: "{{ tower_token }}"
|
||||||
tower_oauthtoken: "{{ tower_token }}"
|
tower_oauthtoken: "{{ tower_token }}"
|
||||||
state: absent
|
state: absent
|
||||||
@@ -86,7 +86,7 @@
|
|||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: Create a second token
|
- name: Create a second token
|
||||||
tower_token:
|
token:
|
||||||
description: '{{ token_description }}'
|
description: '{{ token_description }}'
|
||||||
scope: "write"
|
scope: "write"
|
||||||
state: present
|
state: present
|
||||||
@@ -98,7 +98,7 @@
|
|||||||
|
|
||||||
always:
|
always:
|
||||||
- name: Delete the second Token with our own token
|
- name: Delete the second Token with our own token
|
||||||
tower_token:
|
token:
|
||||||
existing_token_id: "{{ tower_token['id'] }}"
|
existing_token_id: "{{ tower_token['id'] }}"
|
||||||
tower_oauthtoken: "{{ tower_token }}"
|
tower_oauthtoken: "{{ tower_token }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
username: "AWX-Collection-tests-tower_user-user-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
|
username: "AWX-Collection-tests-tower_user-user-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
|
||||||
|
|
||||||
- name: Create a User
|
- name: Create a User
|
||||||
tower_user:
|
user:
|
||||||
username: "{{ username }}"
|
username: "{{ username }}"
|
||||||
first_name: Joe
|
first_name: Joe
|
||||||
password: "{{ 65535 | random | to_uuid }}"
|
password: "{{ 65535 | random | to_uuid }}"
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Change a User by ID
|
- name: Change a User by ID
|
||||||
tower_user:
|
user:
|
||||||
username: "{{ result.id }}"
|
username: "{{ result.id }}"
|
||||||
last_name: User
|
last_name: User
|
||||||
email: joe@example.org
|
email: joe@example.org
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Check idempotency
|
- name: Check idempotency
|
||||||
tower_user:
|
user:
|
||||||
username: "{{ username }}"
|
username: "{{ username }}"
|
||||||
first_name: Joe
|
first_name: Joe
|
||||||
last_name: User
|
last_name: User
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
- "result is not changed"
|
- "result is not changed"
|
||||||
|
|
||||||
- name: Delete a User
|
- name: Delete a User
|
||||||
tower_user:
|
user:
|
||||||
username: "{{ username }}"
|
username: "{{ username }}"
|
||||||
email: joe@example.org
|
email: joe@example.org
|
||||||
state: absent
|
state: absent
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Create an Auditor
|
- name: Create an Auditor
|
||||||
tower_user:
|
user:
|
||||||
first_name: Joe
|
first_name: Joe
|
||||||
last_name: Auditor
|
last_name: Auditor
|
||||||
username: "{{ username }}"
|
username: "{{ username }}"
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Delete an Auditor
|
- name: Delete an Auditor
|
||||||
tower_user:
|
user:
|
||||||
username: "{{ username }}"
|
username: "{{ username }}"
|
||||||
email: joe@example.org
|
email: joe@example.org
|
||||||
state: absent
|
state: absent
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Create a Superuser
|
- name: Create a Superuser
|
||||||
tower_user:
|
user:
|
||||||
first_name: Joe
|
first_name: Joe
|
||||||
last_name: Super
|
last_name: Super
|
||||||
username: "{{ username }}"
|
username: "{{ username }}"
|
||||||
@@ -91,7 +91,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Delete a Superuser
|
- name: Delete a Superuser
|
||||||
tower_user:
|
user:
|
||||||
username: "{{ username }}"
|
username: "{{ username }}"
|
||||||
email: joe@example.org
|
email: joe@example.org
|
||||||
state: absent
|
state: absent
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Test tower SSL parameter
|
- name: Test tower SSL parameter
|
||||||
tower_user:
|
user:
|
||||||
first_name: Joe
|
first_name: Joe
|
||||||
last_name: User
|
last_name: User
|
||||||
username: "{{ username }}"
|
username: "{{ username }}"
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Create an SCM Credential
|
- name: Create an SCM Credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ scm_cred_name }}"
|
name: "{{ scm_cred_name }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
kind: scm
|
kind: scm
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
- "{{ org_name }}"
|
- "{{ org_name }}"
|
||||||
|
|
||||||
- name: Create a Demo Project
|
- name: Create a Demo Project
|
||||||
tower_project:
|
project:
|
||||||
name: "{{ demo_project_name }}"
|
name: "{{ demo_project_name }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
state: present
|
state: present
|
||||||
@@ -86,7 +86,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Add a Tower inventory
|
- name: Add a Tower inventory
|
||||||
tower_inventory:
|
inventory:
|
||||||
description: Test inventory
|
description: Test inventory
|
||||||
organization: Default
|
organization: Default
|
||||||
name: "{{ project_inv }}"
|
name: "{{ project_inv }}"
|
||||||
@@ -618,7 +618,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Delete the inventory
|
- name: Delete the inventory
|
||||||
tower_inventory:
|
inventory:
|
||||||
description: Test inventory
|
description: Test inventory
|
||||||
organization: Default
|
organization: Default
|
||||||
name: "{{ project_inv }}"
|
name: "{{ project_inv }}"
|
||||||
@@ -629,7 +629,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Delete the Demo Project
|
- name: Delete the Demo Project
|
||||||
tower_project:
|
project:
|
||||||
name: "{{ demo_project_name }}"
|
name: "{{ demo_project_name }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
scm_type: git
|
scm_type: git
|
||||||
@@ -643,7 +643,7 @@
|
|||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
- name: Delete the SCM Credential
|
- name: Delete the SCM Credential
|
||||||
tower_credential:
|
credential:
|
||||||
name: "{{ scm_cred_name }}"
|
name: "{{ scm_cred_name }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
kind: scm
|
kind: scm
|
||||||
|
|||||||
Reference in New Issue
Block a user