summaryrefslogtreecommitdiff
path: root/test/integration
diff options
context:
space:
mode:
authorAnsible Core Team <info@ansible.com>2020-03-09 09:40:36 +0000
committerAnsible Core Team <info@ansible.com>2020-03-09 09:40:36 +0000
commit48fa7e27b03f0cd5370d8892173a1fbfe6efb220 (patch)
treecbf72c149656a4d99370ebad75ea2fc62c458bc0 /test/integration
parent1915feadd5aede002d5036a52fd7f77c90bd91c2 (diff)
downloadansible-48fa7e27b03f0cd5370d8892173a1fbfe6efb220.tar.gz
Migrated to awx.awx
Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/targets/tower_credential/aliases2
-rw-r--r--test/integration/targets/tower_credential/tasks/main.yml540
-rw-r--r--test/integration/targets/tower_credential_type/aliases2
-rw-r--r--test/integration/targets/tower_credential_type/tasks/main.yml23
-rw-r--r--test/integration/targets/tower_group/aliases2
-rw-r--r--test/integration/targets/tower_group/tasks/main.yml46
-rw-r--r--test/integration/targets/tower_host/aliases2
-rw-r--r--test/integration/targets/tower_host/tasks/main.yml45
-rw-r--r--test/integration/targets/tower_inventory/aliases2
-rw-r--r--test/integration/targets/tower_inventory/tasks/main.yml34
-rw-r--r--test/integration/targets/tower_inventory_source/aliases2
-rw-r--r--test/integration/targets/tower_inventory_source/tasks/main.yml34
-rw-r--r--test/integration/targets/tower_job_cancel/aliases2
-rw-r--r--test/integration/targets/tower_job_cancel/tasks/main.yml25
-rw-r--r--test/integration/targets/tower_job_launch/aliases2
-rw-r--r--test/integration/targets/tower_job_launch/tasks/main.yml58
-rw-r--r--test/integration/targets/tower_job_list/aliases2
-rw-r--r--test/integration/targets/tower_job_list/tasks/main.yml20
-rw-r--r--test/integration/targets/tower_job_template/aliases2
-rw-r--r--test/integration/targets/tower_job_template/tasks/main.yml54
-rw-r--r--test/integration/targets/tower_job_wait/aliases2
-rw-r--r--test/integration/targets/tower_job_wait/tasks/main.yml26
-rw-r--r--test/integration/targets/tower_label/aliases2
-rw-r--r--test/integration/targets/tower_label/tasks/main.yml19
-rw-r--r--test/integration/targets/tower_notification/aliases2
-rw-r--r--test/integration/targets/tower_notification/tasks/main.yml191
-rw-r--r--test/integration/targets/tower_organization/aliases2
-rw-r--r--test/integration/targets/tower_organization/tasks/main.yml44
-rw-r--r--test/integration/targets/tower_project/aliases2
-rw-r--r--test/integration/targets/tower_project/tasks/create_project_dir.yml45
-rw-r--r--test/integration/targets/tower_project/tasks/main.yml106
-rw-r--r--test/integration/targets/tower_receive/aliases2
-rw-r--r--test/integration/targets/tower_receive/tasks/main.yml17
-rw-r--r--test/integration/targets/tower_role/aliases2
-rw-r--r--test/integration/targets/tower_role/tasks/main.yml39
-rw-r--r--test/integration/targets/tower_send/aliases2
-rw-r--r--test/integration/targets/tower_send/tasks/main.yml75
-rw-r--r--test/integration/targets/tower_settings/aliases2
-rw-r--r--test/integration/targets/tower_settings/tasks/main.yml19
-rw-r--r--test/integration/targets/tower_team/aliases2
-rw-r--r--test/integration/targets/tower_team/tasks/main.yml45
-rw-r--r--test/integration/targets/tower_user/aliases2
-rw-r--r--test/integration/targets/tower_user/tasks/main.yml93
-rw-r--r--test/integration/targets/tower_workflow_launch/aliases2
-rw-r--r--test/integration/targets/tower_workflow_launch/files/tower_assets.json46
-rw-r--r--test/integration/targets/tower_workflow_launch/tasks/main.yml83
-rw-r--r--test/integration/targets/tower_workflow_launch/tests/validate.yml99
-rw-r--r--test/integration/targets/tower_workflow_template/aliases2
-rw-r--r--test/integration/targets/tower_workflow_template/tasks/main.yml105
49 files changed, 0 insertions, 1977 deletions
diff --git a/test/integration/targets/tower_credential/aliases b/test/integration/targets/tower_credential/aliases
deleted file mode 100644
index 229eebe6c9..0000000000
--- a/test/integration/targets/tower_credential/aliases
+++ /dev/null
@@ -1,2 +0,0 @@
-cloud/tower
-shippable/tower/group1
diff --git a/test/integration/targets/tower_credential/tasks/main.yml b/test/integration/targets/tower_credential/tasks/main.yml
deleted file mode 100644
index 407255699c..0000000000
--- a/test/integration/targets/tower_credential/tasks/main.yml
+++ /dev/null
@@ -1,540 +0,0 @@
-- name: create a tempdir for an SSH key
- shell: mktemp -d
- delegate_to: localhost
- register: tempdir
-
-- name: Generate a local SSH key
- shell: "ssh-keygen -b 2048 -t rsa -f {{ tempdir.stdout }}/id_rsa -q -N 'passphrase'"
- delegate_to: localhost
-
-- name: Read the generated key
- set_fact:
- ssh_key_data: "{{ lookup('file', tempdir.stdout + '/id_rsa') }}"
-
-- name: Create a User-specific credential
- tower_credential:
- name: SSH Credential
- organization: Default
- user: admin
- state: present
- kind: ssh
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Delete a User-specific credential
- tower_credential:
- name: SSH Credential
- organization: Default
- user: admin
- state: absent
- kind: ssh
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Create a valid SSH credential
- tower_credential:
- name: SSH Credential
- organization: Default
- state: present
- kind: ssh
- description: An example SSH credential
- username: joe
- password: secret
- become_method: sudo
- become_username: superuser
- become_password: supersecret
- ssh_key_data: "{{ ssh_key_data }}"
- ssh_key_unlock: "passphrase"
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Create a valid SSH credential from lookup source
- tower_credential:
- name: SSH Credential from lookup source
- organization: Default
- state: present
- kind: ssh
- description: An example SSH credential from lookup source
- username: joe
- password: secret
- become_method: sudo
- become_username: superuser
- become_password: supersecret
- ssh_key_data: "{{ lookup('file', tempdir.stdout + '/id_rsa') }}"
- ssh_key_unlock: "passphrase"
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Create a valid SSH credential from file source
- tower_credential:
- name: SSH Credential from file source
- organization: Default
- state: present
- kind: ssh
- description: An example SSH credential from file source
- username: joe
- password: secret
- become_method: sudo
- become_username: superuser
- become_password: supersecret
- ssh_key_data: "{{ tempdir.stdout }}/id_rsa"
- ssh_key_unlock: "passphrase"
- register: result
-
-- assert:
- that:
- - "result is changed"
- - "result is not failed"
- - "'ssh_key_data should be a string, not a path to a file.' in result.deprecations[0].msg"
-
-- name: Create an invalid SSH credential (passphrase required)
- tower_credential:
- name: SSH Credential
- organization: Default
- state: present
- kind: ssh
- username: joe
- ssh_key_data: "{{ ssh_key_data }}"
- ignore_errors: yes
- register: result
-
-- assert:
- that:
- - "result is failed"
- - "'must be set when SSH key is encrypted' in result.msg"
-
-- name: Create an invalid SSH credential (Organization not found)
- tower_credential:
- name: SSH Credential
- organization: Missing Organization
- state: present
- kind: ssh
- username: joe
- ignore_errors: yes
- register: result
-
-- assert:
- that:
- - "result is failed"
- - "'The requested object could not be found' in result.msg"
-
-- name: Delete an SSH credential
- tower_credential:
- name: SSH Credential
- organization: Default
- state: absent
- kind: ssh
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Create a valid Vault credential
- tower_credential:
- name: Vault Credential
- organization: Default
- state: present
- kind: vault
- description: An example Vault credential
- vault_password: secret-vault
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Create a valid Vault credential w/ kind=ssh (deprecated)
- tower_credential:
- name: Vault Credential
- organization: Default
- state: present
- kind: ssh
- description: An example Vault credential
- vault_password: secret-vault
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Delete a Vault credential
- tower_credential:
- name: Vault Credential
- organization: Default
- state: absent
- kind: vault
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Create a valid Network credential
- tower_credential:
- name: Network Credential
- organization: Default
- state: present
- kind: net
- username: joe
- password: secret
- authorize: true
- authorize_password: authorize-me
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Delete a Network credential
- tower_credential:
- name: Network Credential
- organization: Default
- state: absent
- kind: net
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Create a valid SCM credential
- tower_credential:
- name: SCM Credential
- organization: Default
- state: present
- kind: scm
- username: joe
- password: secret
- ssh_key_data: "{{ ssh_key_data }}"
- ssh_key_unlock: "passphrase"
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Delete an SCM credential
- tower_credential:
- name: SCM Credential
- organization: Default
- state: absent
- kind: scm
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Create a valid AWS credential
- tower_credential:
- name: AWS Credential
- organization: Default
- state: present
- kind: aws
- username: joe
- password: secret
- security_token: aws-token
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Delete an AWS credential
- tower_credential:
- name: AWS Credential
- organization: Default
- state: absent
- kind: aws
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Create a valid VMware credential
- tower_credential:
- name: VMware Credential
- organization: Default
- state: present
- kind: vmware
- host: https://example.org
- username: joe
- password: secret
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Delete an VMware credential
- tower_credential:
- name: VMware Credential
- organization: Default
- state: absent
- kind: vmware
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Create a valid Satellite6 credential
- tower_credential:
- name: Satellite6 Credential
- organization: Default
- state: present
- kind: satellite6
- host: https://example.org
- username: joe
- password: secret
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Delete a Satellite6 credential
- tower_credential:
- name: Satellite6 Credential
- organization: Default
- state: absent
- kind: satellite6
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Create a valid CloudForms credential
- tower_credential:
- name: CloudForms Credential
- organization: Default
- state: present
- kind: cloudforms
- host: https://example.org
- username: joe
- password: secret
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Delete a CloudForms credential
- tower_credential:
- name: CloudForms Credential
- organization: Default
- state: absent
- kind: cloudforms
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Create a valid GCE credential
- tower_credential:
- name: GCE Credential
- organization: Default
- state: present
- kind: gce
- username: joe
- project: ABC123
- ssh_key_data: "{{ ssh_key_data }}"
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Delete a GCE credential
- tower_credential:
- name: GCE Credential
- organization: Default
- state: absent
- kind: gce
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Create a valid AzureRM credential
- tower_credential:
- name: AzureRM Credential
- organization: Default
- state: present
- kind: azure_rm
- username: joe
- password: secret
- subscription: some-subscription
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Create a valid AzureRM credential with a tenant
- tower_credential:
- name: AzureRM Credential
- organization: Default
- state: present
- kind: azure_rm
- client: some-client
- secret: some-secret
- tenant: some-tenant
- subscription: some-subscription
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Delete an AzureRM credential
- tower_credential:
- name: AzureRM Credential
- organization: Default
- state: absent
- kind: azure_rm
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Create a valid OpenStack credential
- tower_credential:
- name: OpenStack Credential
- organization: Default
- state: present
- kind: openstack
- host: https://keystone.example.org
- username: joe
- password: secret
- project: tenant123
- domain: some-domain
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Delete a OpenStack credential
- tower_credential:
- name: OpenStack Credential
- organization: Default
- state: absent
- kind: openstack
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Create a valid RHV credential
- tower_credential:
- name: RHV Credential
- organization: Default
- state: present
- kind: rhv
- host: https://example.org
- username: joe
- password: secret
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Delete an RHV credential
- tower_credential:
- name: RHV Credential
- organization: Default
- state: absent
- kind: rhv
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Create a valid Insights credential
- tower_credential:
- name: Insights Credential
- organization: Default
- state: present
- kind: insights
- username: joe
- password: secret
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Delete an Insights credential
- tower_credential:
- name: Insights Credential
- organization: Default
- state: absent
- kind: insights
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Create a valid Tower-to-Tower credential
- tower_credential:
- name: Tower Credential
- organization: Default
- state: present
- kind: tower
- host: https://tower.example.org
- username: joe
- password: secret
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Delete a Tower-to-Tower credential
- tower_credential:
- name: Tower Credential
- organization: Default
- state: absent
- kind: tower
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Check module fails with correct msg
- tower_credential:
- name: test-credential
- description: Credential Description
- kind: ssh
- organization: test-non-existing-org
- state: present
- register: result
- ignore_errors: true
-
-- assert:
- that:
- - "result.msg =='Failed to update credential, organization not found: The requested object could not be found.'"
diff --git a/test/integration/targets/tower_credential_type/aliases b/test/integration/targets/tower_credential_type/aliases
deleted file mode 100644
index 229eebe6c9..0000000000
--- a/test/integration/targets/tower_credential_type/aliases
+++ /dev/null
@@ -1,2 +0,0 @@
-cloud/tower
-shippable/tower/group1
diff --git a/test/integration/targets/tower_credential_type/tasks/main.yml b/test/integration/targets/tower_credential_type/tasks/main.yml
deleted file mode 100644
index 9d7cc74e73..0000000000
--- a/test/integration/targets/tower_credential_type/tasks/main.yml
+++ /dev/null
@@ -1,23 +0,0 @@
----
-- name: Add Tower credential type
- tower_credential_type:
- description: Credential type for Test
- name: test-credential-type
- kind: cloud
- inputs: '{"fields": [{"type": "string", "id": "username", "label": "Username"}, {"secret": True, "type": "string", "id": "password", "label": "Password"}], "required": ["username", "password"]}'
- injectors: '{"extra_vars": {"test": "foo"}}'
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Remove a Tower credential type
- tower_credential_type:
- name: test-credential-type
- state: absent
- register: result
-
-- assert:
- that:
- - "result is changed"
diff --git a/test/integration/targets/tower_group/aliases b/test/integration/targets/tower_group/aliases
deleted file mode 100644
index 229eebe6c9..0000000000
--- a/test/integration/targets/tower_group/aliases
+++ /dev/null
@@ -1,2 +0,0 @@
-cloud/tower
-shippable/tower/group1
diff --git a/test/integration/targets/tower_group/tasks/main.yml b/test/integration/targets/tower_group/tasks/main.yml
deleted file mode 100644
index cdbef32535..0000000000
--- a/test/integration/targets/tower_group/tasks/main.yml
+++ /dev/null
@@ -1,46 +0,0 @@
-- name: create a tempdir for hostvars
- shell: mktemp -d
- register: tempdir
-
-- name: write a file w/ hostvars
- lineinfile:
- dest: "{{ tempdir.stdout }}/vars"
- line: '{"foo": "bar"}'
- create: true
-
-- name: Create a Group
- tower_group:
- name: Some Group
- inventory: Demo Inventory
- state: present
- source: ec2
- variables: "@{{ tempdir.stdout }}/vars"
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Delete a Group
- tower_group:
- name: Some Group
- inventory: Demo Inventory
- state: absent
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Check module fails with correct msg
- tower_group:
- name: test-group
- description: Group Description
- inventory: test-non-existing-inventory
- state: present
- register: result
- ignore_errors: true
-
-- assert:
- that:
- - "result.msg =='Failed to update the group, inventory not found: The requested object could not be found.'"
diff --git a/test/integration/targets/tower_host/aliases b/test/integration/targets/tower_host/aliases
deleted file mode 100644
index 229eebe6c9..0000000000
--- a/test/integration/targets/tower_host/aliases
+++ /dev/null
@@ -1,2 +0,0 @@
-cloud/tower
-shippable/tower/group1
diff --git a/test/integration/targets/tower_host/tasks/main.yml b/test/integration/targets/tower_host/tasks/main.yml
deleted file mode 100644
index cda418f94f..0000000000
--- a/test/integration/targets/tower_host/tasks/main.yml
+++ /dev/null
@@ -1,45 +0,0 @@
-- name: create a tempdir for hostvars
- shell: mktemp -d
- register: tempdir
-
-- name: write a file w/ hostvars
- lineinfile:
- dest: "{{ tempdir.stdout }}/vars"
- line: '{"foo": "bar"}'
- create: true
-
-- name: Create a Host
- tower_host:
- name: "some-host"
- inventory: "Demo Inventory"
- state: present
- variables: "@{{ tempdir.stdout }}/vars"
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Delete a Host
- tower_host:
- name: "some-host"
- inventory: "Demo Inventory"
- state: absent
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Check module fails with correct msg
- tower_host:
- name: test-host
- description: Host Description
- inventory: test-non-existing-inventory
- state: present
- register: result
- ignore_errors: true
-
-- assert:
- that:
- - "result.msg =='Failed to update host, inventory not found: The requested object could not be found.'"
diff --git a/test/integration/targets/tower_inventory/aliases b/test/integration/targets/tower_inventory/aliases
deleted file mode 100644
index 229eebe6c9..0000000000
--- a/test/integration/targets/tower_inventory/aliases
+++ /dev/null
@@ -1,2 +0,0 @@
-cloud/tower
-shippable/tower/group1
diff --git a/test/integration/targets/tower_inventory/tasks/main.yml b/test/integration/targets/tower_inventory/tasks/main.yml
deleted file mode 100644
index e1af6d6454..0000000000
--- a/test/integration/targets/tower_inventory/tasks/main.yml
+++ /dev/null
@@ -1,34 +0,0 @@
-- name: Create an Inventory
- tower_inventory:
- name: my-inventory
- organization: Default
- state: present
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Delete an Inventory
- tower_inventory:
- name: my-inventory
- organization: Default
- state: absent
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Check module fails with correct msg
- tower_inventory:
- name: test-inventory
- description: Inventory Description
- organization: test-non-existing-org
- state: present
- register: result
- ignore_errors: true
-
-- assert:
- that:
- - "result.msg =='Failed to update inventory, organization not found: The requested object could not be found.'" \ No newline at end of file
diff --git a/test/integration/targets/tower_inventory_source/aliases b/test/integration/targets/tower_inventory_source/aliases
deleted file mode 100644
index 229eebe6c9..0000000000
--- a/test/integration/targets/tower_inventory_source/aliases
+++ /dev/null
@@ -1,2 +0,0 @@
-cloud/tower
-shippable/tower/group1
diff --git a/test/integration/targets/tower_inventory_source/tasks/main.yml b/test/integration/targets/tower_inventory_source/tasks/main.yml
deleted file mode 100644
index 110a162270..0000000000
--- a/test/integration/targets/tower_inventory_source/tasks/main.yml
+++ /dev/null
@@ -1,34 +0,0 @@
----
-- name: Add a Tower credential
- tower_credential:
- description: Credentials for Openstack Test project
- name: openstack-test-credential
- kind: openstack
- organization: Default
- project: Test
- username: admin
- host: https://example.org:5000
- password: passw0rd
- domain: test
-
-- name: Add a Tower inventory
- tower_inventory:
- description: Test inventory
- name: openstack-test-inventory
- organization: Default
-
-- name: Create a source inventory
- tower_inventory_source:
- name: source-test-inventory
- description: Source for Test inventory
- inventory: openstack-test-inventory
- credential: openstack-test-credential
- overwrite: True
- update_on_launch: True
- source_vars: "---\nprivate: false"
- source: openstack
- register: result
-
-- assert:
- that:
- - "result is changed"
diff --git a/test/integration/targets/tower_job_cancel/aliases b/test/integration/targets/tower_job_cancel/aliases
deleted file mode 100644
index 229eebe6c9..0000000000
--- a/test/integration/targets/tower_job_cancel/aliases
+++ /dev/null
@@ -1,2 +0,0 @@
-cloud/tower
-shippable/tower/group1
diff --git a/test/integration/targets/tower_job_cancel/tasks/main.yml b/test/integration/targets/tower_job_cancel/tasks/main.yml
deleted file mode 100644
index 304e71a84f..0000000000
--- a/test/integration/targets/tower_job_cancel/tasks/main.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-- name: Launch a Job Template
- tower_job_launch:
- job_template: "Demo Job Template"
- inventory: "Demo Inventory"
- credential: "Demo Credential"
- register: job
-
-- assert:
- that:
- - "job is changed"
- - "job.status == 'pending'"
-
-- name: Cancel the job
- tower_job_cancel:
- job_id: "{{ job.id }}"
-
-- name: Check module fails with correct msg
- tower_job_cancel:
- job_id: 9999999999
- register: result
- ignore_errors: true
-
-- assert:
- that:
- - "result.msg =='Unable to cancel job_id/9999999999: The requested object could not be found.'" \ No newline at end of file
diff --git a/test/integration/targets/tower_job_launch/aliases b/test/integration/targets/tower_job_launch/aliases
deleted file mode 100644
index 229eebe6c9..0000000000
--- a/test/integration/targets/tower_job_launch/aliases
+++ /dev/null
@@ -1,2 +0,0 @@
-cloud/tower
-shippable/tower/group1
diff --git a/test/integration/targets/tower_job_launch/tasks/main.yml b/test/integration/targets/tower_job_launch/tasks/main.yml
deleted file mode 100644
index 7550377905..0000000000
--- a/test/integration/targets/tower_job_launch/tasks/main.yml
+++ /dev/null
@@ -1,58 +0,0 @@
-- name: Launch a Job Template
- tower_job_launch:
- job_template: "Demo Job Template"
- inventory: "Demo Inventory"
- credential: "Demo Credential"
- register: result
-
-- assert:
- that:
- - "result is changed"
- - "result.status == 'pending'"
-
-- name: Wait for a job template to complete
- tower_job_wait:
- job_id: "{{ result.id }}"
- max_interval: 10
- timeout: 120
- register: result
-
-- assert:
- that:
- - "result is not changed"
- - "result.status == 'successful'"
-
-- name: Check module fails with correct msg
- tower_job_launch:
- job_template: "Non Existing Job Template"
- inventory: "Test Inventory"
- credential: "Test Credential"
- register: result
- ignore_errors: true
-
-- assert:
- that:
- - "result.msg =='Unable to launch job, job_template/Non Existing Job Template was not found: The requested object could not be found.'"
-
-- name: Create a Job Template for testing prompt on launch
- tower_job_template:
- name: "Demo Job Template - ask inventory and credential"
- project: Demo Project
- playbook: hello_world.yml
- job_type: run
- ask_credential: yes
- ask_inventory: yes
- state: present
- register: result
-
-- name: Launch job template with inventory and credential for prompt on launch
- tower_job_launch:
- job_template: "Demo Job Template - ask inventory and credential"
- inventory: "Demo Inventory"
- credential: "Demo Credential"
- register: result
-
-- assert:
- that:
- - "result is changed"
- - "result.status == 'pending'"
diff --git a/test/integration/targets/tower_job_list/aliases b/test/integration/targets/tower_job_list/aliases
deleted file mode 100644
index 229eebe6c9..0000000000
--- a/test/integration/targets/tower_job_list/aliases
+++ /dev/null
@@ -1,2 +0,0 @@
-cloud/tower
-shippable/tower/group1
diff --git a/test/integration/targets/tower_job_list/tasks/main.yml b/test/integration/targets/tower_job_list/tasks/main.yml
deleted file mode 100644
index 63c6061f46..0000000000
--- a/test/integration/targets/tower_job_list/tasks/main.yml
+++ /dev/null
@@ -1,20 +0,0 @@
-- name: Launch a Job Template
- tower_job_launch:
- job_template: "Demo Job Template"
- inventory: "Demo Inventory"
- credential: "Demo Credential"
- register: job
-
-- assert:
- that:
- - "job is changed"
- - "job.status == 'pending'"
-
-- name: List jobs w/ a matching primary key
- tower_job_list:
- query: {"id": "{{ job.id }}"}
- register: matching_jobs
-
-- assert:
- that:
- - "{{ matching_jobs.count }} == 1"
diff --git a/test/integration/targets/tower_job_template/aliases b/test/integration/targets/tower_job_template/aliases
deleted file mode 100644
index 229eebe6c9..0000000000
--- a/test/integration/targets/tower_job_template/aliases
+++ /dev/null
@@ -1,2 +0,0 @@
-cloud/tower
-shippable/tower/group1
diff --git a/test/integration/targets/tower_job_template/tasks/main.yml b/test/integration/targets/tower_job_template/tasks/main.yml
deleted file mode 100644
index 6018445662..0000000000
--- a/test/integration/targets/tower_job_template/tasks/main.yml
+++ /dev/null
@@ -1,54 +0,0 @@
-- name: Create an SCM Credential
- tower_credential:
- name: SCM Credential for JT
- organization: Default
- kind: scm
-
-- name: Create a Demo Project
- tower_project:
- name: Job Template Test Project
- organization: Default
- state: present
- scm_type: git
- scm_url: https://github.com/ansible/ansible-tower-samples.git
- scm_credential: SCM Credential for JT
- register: result
-
-- name: Update the project (to clone the git repo)
- uri:
- url: "https://{{ tower_host }}/api/v2/projects/{{ result.id }}/update/"
- method: POST
- user: "{{ tower_username }}"
- password: "{{ tower_password }}"
- validate_certs: false
- status_code: 202
- force_basic_auth: true
-
-- name: Wait for the project to be status=successful
- uri:
- url: "https://{{ tower_host }}/api/v2/projects/{{ result.id }}/"
- method: GET
- user: "{{ tower_username }}"
- password: "{{ tower_password }}"
- validate_certs: false
- force_basic_auth: true
- return_content: true
- register: result
- until: result.json.status == "successful"
- retries: 60
- delay: 1
-
-- name: Create a Job Template
- tower_job_template:
- name: hello-world
- project: Job Template Test Project
- inventory: Demo Inventory
- playbook: hello_world.yml
- credential: Demo Credential
- job_type: run
- state: present
- register: result
-
-- assert:
- that:
- - "result is changed"
diff --git a/test/integration/targets/tower_job_wait/aliases b/test/integration/targets/tower_job_wait/aliases
deleted file mode 100644
index 229eebe6c9..0000000000
--- a/test/integration/targets/tower_job_wait/aliases
+++ /dev/null
@@ -1,2 +0,0 @@
-cloud/tower
-shippable/tower/group1
diff --git a/test/integration/targets/tower_job_wait/tasks/main.yml b/test/integration/targets/tower_job_wait/tasks/main.yml
deleted file mode 100644
index 2ffc5bca3a..0000000000
--- a/test/integration/targets/tower_job_wait/tasks/main.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-- name: Launch a Job Template
- tower_job_launch:
- job_template: "Demo Job Template"
- inventory: "Demo Inventory"
- credential: "Demo Credential"
- register: job
-
-- assert:
- that:
- - "job is changed"
- - "job.status == 'pending'"
-
-- name: Wait for the Job to finish
- tower_job_wait:
- job_id: "{{ job.id }}"
- timeout: 60
-
-- name: Check module fails with correct msg
- tower_job_wait:
- job_id: "99999999"
- register: result
- ignore_errors: true
-
-- assert:
- that:
- - "result.msg =='Unable to wait, no job_id 99999999 found: The requested object could not be found.'" \ No newline at end of file
diff --git a/test/integration/targets/tower_label/aliases b/test/integration/targets/tower_label/aliases
deleted file mode 100644
index 229eebe6c9..0000000000
--- a/test/integration/targets/tower_label/aliases
+++ /dev/null
@@ -1,2 +0,0 @@
-cloud/tower
-shippable/tower/group1
diff --git a/test/integration/targets/tower_label/tasks/main.yml b/test/integration/targets/tower_label/tasks/main.yml
deleted file mode 100644
index f86712b96a..0000000000
--- a/test/integration/targets/tower_label/tasks/main.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-- name: Create a Label
- tower_label:
- name: important
- organization: Default
- state: present
-
-- name: Check module fails with correct msg
- tower_label:
- name: "Test Label"
- organization: "Non existing org"
- state: present
- register: result
- ignore_errors: true
-
-- assert:
- that:
- - "result.msg == 'Failed to update label, organization not found: The requested object could not be found.'"
-
-# TODO: Deleting labels doesn't seem to work currently
diff --git a/test/integration/targets/tower_notification/aliases b/test/integration/targets/tower_notification/aliases
deleted file mode 100644
index 229eebe6c9..0000000000
--- a/test/integration/targets/tower_notification/aliases
+++ /dev/null
@@ -1,2 +0,0 @@
-cloud/tower
-shippable/tower/group1
diff --git a/test/integration/targets/tower_notification/tasks/main.yml b/test/integration/targets/tower_notification/tasks/main.yml
deleted file mode 100644
index 5cf56be413..0000000000
--- a/test/integration/targets/tower_notification/tasks/main.yml
+++ /dev/null
@@ -1,191 +0,0 @@
-- name: Create Slack notification
- tower_notification:
- name: notification1
- notification_type: slack
- token: a_token
- channels:
- - general
- state: present
- register: result
-
-- assert:
- that:
- - result is changed
-
-- name: Delete Slack notification
- tower_notification:
- name: notification1
- notification_type: slack
- state: absent
- register: result
-
-- assert:
- that:
- - result is changed
-
-- name: Add webhook notification
- tower_notification:
- name: notification2
- notification_type: webhook
- url: http://www.example.com/hook
- headers:
- X-Custom-Header: value123
- state: present
- register: result
-
-- assert:
- that:
- - result is changed
-
-- name: Delete webhook notification
- tower_notification:
- name: notification2
- notification_type: webhook
- state: absent
- register: result
-
-- assert:
- that:
- - result is changed
-
-- name: Add email notification
- tower_notification:
- name: notification3
- notification_type: email
- username: user
- password: s3cr3t
- sender: tower@example.com
- recipients:
- - user1@example.com
- host: smtp.example.com
- port: 25
- use_tls: no
- use_ssl: no
- state: present
- register: result
-
-- assert:
- that:
- - result is changed
-
-- name: Delete email notification
- tower_notification:
- name: notification3
- notification_type: email
- state: absent
- register: result
-
-- assert:
- that:
- - result is changed
-
-- name: Add twilio notification
- tower_notification:
- name: notification4
- notification_type: twilio
- account_token: a_token
- account_sid: a_sid
- from_number: '+15551112222'
- to_numbers:
- - '+15553334444'
- state: present
- register: result
-
-- assert:
- that:
- - result is changed
-
-- name: Delete twilio notification
- tower_notification:
- name: notification4
- notification_type: twilio
- state: absent
- register: result
-
-- assert:
- that:
- - result is changed
-
-- name: Add PagerDuty notification
- tower_notification:
- name: notification5
- notification_type: pagerduty
- token: a_token
- subdomain: sub
- client_name: client
- service_key: a_key
- state: present
- register: result
-
-- assert:
- that:
- - result is changed
-
-- name: Delete PagerDuty notification
- tower_notification:
- name: notification5
- notification_type: pagerduty
- state: absent
- register: result
-
-- assert:
- that:
- - result is changed
-
-- name: Add HipChat notification
- tower_notification:
- name: notification6
- notification_type: hipchat
- token: a_token
- message_from: user1
- api_url: https://hipchat.example.com
- color: red
- rooms:
- - room-A
- notify: yes
- state: present
- register: result
-
-- assert:
- that:
- - result is changed
-
-- name: Delete HipChat notification
- tower_notification:
- name: notification6
- notification_type: hipchat
- state: absent
- register: result
-
-- assert:
- that:
- - result is changed
-
-- name: Add IRC notification
- tower_notification:
- name: notification7
- notification_type: irc
- nickname: tower
- password: s3cr3t
- targets:
- - user1
- port: 8080
- server: irc.example.com
- use_ssl: no
- state: present
- register: result
-
-- assert:
- that:
- - result is changed
-
-- name: Delete IRC notification
- tower_notification:
- name: notification7
- notification_type: irc
- state: absent
- register: result
-
-- assert:
- that:
- - result is changed
diff --git a/test/integration/targets/tower_organization/aliases b/test/integration/targets/tower_organization/aliases
deleted file mode 100644
index 229eebe6c9..0000000000
--- a/test/integration/targets/tower_organization/aliases
+++ /dev/null
@@ -1,2 +0,0 @@
-cloud/tower
-shippable/tower/group1
diff --git a/test/integration/targets/tower_organization/tasks/main.yml b/test/integration/targets/tower_organization/tasks/main.yml
deleted file mode 100644
index bd28bf8616..0000000000
--- a/test/integration/targets/tower_organization/tasks/main.yml
+++ /dev/null
@@ -1,44 +0,0 @@
-- name: confirm Tower version w/ check mode
- tower_organization:
- name: Default
- check_mode: yes
- register: result
-
-- assert:
- that:
- - "result.tower_version == '{{ tower_version }}'"
-
-- name: Make sure the default Default organization exists
- tower_organization:
- name: Default
-
-- name: Check that SSL is available
- tower_organization:
- name: Default
- register: result
-
-- name: Check we haven't changed anything
- assert:
- that: result is not changed
-
-- name: Check that SSL is available and verify_ssl is enabled (task must fail)
- tower_organization:
- name: Default
- environment:
- TOWER_CERTIFICATE: /dev/null # force check failure
- ignore_errors: true
- register: check_ssl_is_used
-
-- name: Disable verify_ssl in ~/.tower_cli.cfg
- copy:
- dest: ~/.tower_cli.cfg
- content: |
- [general]
- verify_ssl = False
- force: false # ensure remote file doesn't exist
-
-- name: Check that verify_ssl is disabled (task must not fail)
- tower_organization:
- name: Default
- environment:
- TOWER_CERTIFICATE: /dev/null # should not fail because verify_ssl is disabled
diff --git a/test/integration/targets/tower_project/aliases b/test/integration/targets/tower_project/aliases
deleted file mode 100644
index 229eebe6c9..0000000000
--- a/test/integration/targets/tower_project/aliases
+++ /dev/null
@@ -1,2 +0,0 @@
-cloud/tower
-shippable/tower/group1
diff --git a/test/integration/targets/tower_project/tasks/create_project_dir.yml b/test/integration/targets/tower_project/tasks/create_project_dir.yml
deleted file mode 100644
index 5238da8b45..0000000000
--- a/test/integration/targets/tower_project/tasks/create_project_dir.yml
+++ /dev/null
@@ -1,45 +0,0 @@
-- name: Fetch project_base_dir
- uri:
- url: "https://{{ tower_host}}/api/v2/config/"
- user: "{{ tower_username }}"
- password: "{{ tower_password }}"
- validate_certs: false
- return_content: true
- force_basic_auth: true
- register: awx_config
-
-- tower_inventory:
- name: localhost
- organization: Default
-
-- tower_host:
- name: localhost
- inventory: localhost
- variables:
- ansible_connection: local
-
-- name: create an unused SSH / Machine credential
- tower_credential:
- name: dummy
- kind: ssh
- ssh_key_data: |
- -----BEGIN EC PRIVATE KEY-----
- MHcCAQEEIIUl6R1xgzR6siIUArz4XBPtGZ09aetma2eWf1v3uYymoAoGCCqGSM49
- AwEHoUQDQgAENJNjgeZDAh/+BY860s0yqrLDprXJflY0GvHIr7lX3ieCtrzOMCVU
- QWzw35pc5tvuP34SSi0ZE1E+7cVMDDOF3w==
- -----END EC PRIVATE KEY-----
- organization: Default
-
-- name: Disable bubblewrap
- command: tower-cli setting modify AWX_PROOT_ENABLED false
-
-- block:
- - name: Create a directory for manual project
- vars:
- project_base_dir: "{{ awx_config.json.project_base_dir }}"
- command: tower-cli ad_hoc launch --monitor --inventory localhost
- --credential dummy --module-name command
- --module-args "mkdir {{ project_base_dir }}/manual_test_project"
- always:
- - name: enable bubblewrap
- command: tower-cli setting modify AWX_PROOT_ENABLED true
diff --git a/test/integration/targets/tower_project/tasks/main.yml b/test/integration/targets/tower_project/tasks/main.yml
deleted file mode 100644
index ba9096c20f..0000000000
--- a/test/integration/targets/tower_project/tasks/main.yml
+++ /dev/null
@@ -1,106 +0,0 @@
-- name: Create an SCM Credential
- tower_credential:
- name: SCM Credential for Project
- organization: Default
- kind: scm
-
-- name: Create a Project
- tower_project:
- name: my-project
- organization: Default
- state: present
- scm_credential: SCM Credential for Project
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Delete a Project
- tower_project:
- name: my-project
- state: absent
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: create a project directory for manual project
- import_tasks: create_project_dir.yml
-
-- name: Create a manual project
- tower_project:
- name: manual project
- organization: Default
- scm_type: manual
- local_path: "manual_test_project"
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Create a git project without credentials
- tower_project:
- name: git project
- organization: Default
- scm_type: git
- scm_url: https://github.com/ansible/ansible
-
-- name: "Create {{ item }}"
- tower_organization:
- name: "{{ item }}"
- loop:
- - TestOrg1
- - TestOrg2
-
-- name: "Create credential"
- tower_credential:
- kind: scm
- name: TestCred1
- organization: "{{ item }}"
- loop:
- - TestOrg2
- - TestOrg1
-
-- name: Create project TestProject
- tower_project:
- name: TestProject
- organization: TestOrg1
- scm_type: git
- scm_url: "https://github.com/ansible/ansible"
- scm_credential: TestCred1
- register: multi_org_cred_project
-
-- assert:
- that:
- - "multi_org_cred_project is changed"
-
-- name: Check module fails with correct msg
- tower_project:
- name: TestProject
- organization: Non Existing Org
- scm_type: git
- scm_url: "https://github.com/ansible/ansible"
- scm_credential: TestCred1
- register: result
- ignore_errors: true
-
-- assert:
- that:
- - "result.msg == 'Failed to update project, organization not found: Non Existing Org'"
-
-- name: Check module fails with correct msg
- tower_project:
- name: TestProject
- organization: TestOrg1
- scm_type: git
- scm_url: "https://github.com/ansible/ansible"
- scm_credential: Non Existing Credential
- register: result
- ignore_errors: true
-
-- assert:
- that:
- - "result.msg =='Failed to update project, credential not found: Non Existing Credential'" \ No newline at end of file
diff --git a/test/integration/targets/tower_receive/aliases b/test/integration/targets/tower_receive/aliases
deleted file mode 100644
index 229eebe6c9..0000000000
--- a/test/integration/targets/tower_receive/aliases
+++ /dev/null
@@ -1,2 +0,0 @@
-cloud/tower
-shippable/tower/group1
diff --git a/test/integration/targets/tower_receive/tasks/main.yml b/test/integration/targets/tower_receive/tasks/main.yml
deleted file mode 100644
index 9c22e6f7a7..0000000000
--- a/test/integration/targets/tower_receive/tasks/main.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-- name: Export all Tower assets
- tower_receive:
- all: True
- register: result
-
-- assert:
- that:
- - "result is successful"
-
-- name: Extract names from output
- set_fact:
- object_names: "{{ result.assets | map(attribute='name') | list }}"
-
-- assert:
- that:
- - "result is successful"
- - "'Default' in object_names"
diff --git a/test/integration/targets/tower_role/aliases b/test/integration/targets/tower_role/aliases
deleted file mode 100644
index 229eebe6c9..0000000000
--- a/test/integration/targets/tower_role/aliases
+++ /dev/null
@@ -1,2 +0,0 @@
-cloud/tower
-shippable/tower/group1
diff --git a/test/integration/targets/tower_role/tasks/main.yml b/test/integration/targets/tower_role/tasks/main.yml
deleted file mode 100644
index eb1602f9b6..0000000000
--- a/test/integration/targets/tower_role/tasks/main.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-- name: Create a User
- tower_user:
- first_name: Joe
- last_name: User
- username: joe
- password: "{{ 65535 | random | to_uuid }}"
- email: joe@example.org
- state: present
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Add Joe to the update role of the default Project
- tower_role:
- user: joe
- role: update
- project: Demo Project
- state: "{{ item }}"
- register: result
- with_items:
- - "present"
- - "absent"
-
-- assert:
- that:
- - "result is changed"
-
-- name: Delete a User
- tower_user:
- username: joe
- email: joe@example.org
- state: absent
- register: result
-
-- assert:
- that:
- - "result is changed"
diff --git a/test/integration/targets/tower_send/aliases b/test/integration/targets/tower_send/aliases
deleted file mode 100644
index 229eebe6c9..0000000000
--- a/test/integration/targets/tower_send/aliases
+++ /dev/null
@@ -1,2 +0,0 @@
-cloud/tower
-shippable/tower/group1
diff --git a/test/integration/targets/tower_send/tasks/main.yml b/test/integration/targets/tower_send/tasks/main.yml
deleted file mode 100644
index 0d83896301..0000000000
--- a/test/integration/targets/tower_send/tasks/main.yml
+++ /dev/null
@@ -1,75 +0,0 @@
-- name: Test no parameters
- tower_send:
- register: result
- ignore_errors: yes
-
-- assert:
- that:
- - "result is failed"
-
-- name: Create user json
- set_fact:
- user:
- - username: "jowestco"
- first_name: "John"
- last_name: "Westcott"
- asset_type: "user"
- email: "john.westcott.iv@redhat.com"
-
-- name: Test a new import of asset
- tower_send:
- assets: "{{ user | to_json() }}"
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Test an existing import of asset
- tower_send:
- assets: "{{ user | to_json() }}"
- register: result
-
-- assert:
- that:
- - "result is successful"
- - "result is not changed"
-
-- name: Change an existing asset
- tower_send:
- assets: "{{ user | combine({'last_name': 'Westcott IV'}) | to_json() }}"
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Create organization json
- set_fact:
- organization:
- - asset_type: organization
- name: "Red Hat"
-
-- name: Create temp file
- tempfile:
- state: file
- register: my_temp_file
-
-- name: Drop down a file to import
- copy:
- dest: "{{ my_temp_file.path }}"
- content: "{{ organization | to_nice_json() }}"
-
-- name: Create org via files
- tower_send:
- files: "{{ my_temp_file.path }}"
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Remove Temp File
- file:
- path: "{{ my_temp_file.path }}"
- state: absent
diff --git a/test/integration/targets/tower_settings/aliases b/test/integration/targets/tower_settings/aliases
deleted file mode 100644
index 229eebe6c9..0000000000
--- a/test/integration/targets/tower_settings/aliases
+++ /dev/null
@@ -1,2 +0,0 @@
-cloud/tower
-shippable/tower/group1
diff --git a/test/integration/targets/tower_settings/tasks/main.yml b/test/integration/targets/tower_settings/tasks/main.yml
deleted file mode 100644
index bde639f7a3..0000000000
--- a/test/integration/targets/tower_settings/tasks/main.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-- name: Set the value of AWX_PROOT_SHOW_PATHS
- tower_settings:
- name: "AWX_PROOT_SHOW_PATHS"
- value: "'/var/lib/awx/projects/', '/tmp'"
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Set the value of AWX_PROOT_BASE_PATH
- tower_settings:
- name: AWX_PROOT_BASE_PATH
- value: "/tmp"
- register: result
-
-- assert:
- that:
- - "result.value == '/tmp'"
diff --git a/test/integration/targets/tower_team/aliases b/test/integration/targets/tower_team/aliases
deleted file mode 100644
index 229eebe6c9..0000000000
--- a/test/integration/targets/tower_team/aliases
+++ /dev/null
@@ -1,2 +0,0 @@
-cloud/tower
-shippable/tower/group1
diff --git a/test/integration/targets/tower_team/tasks/main.yml b/test/integration/targets/tower_team/tasks/main.yml
deleted file mode 100644
index 96fb921a81..0000000000
--- a/test/integration/targets/tower_team/tasks/main.yml
+++ /dev/null
@@ -1,45 +0,0 @@
-- name: Attempt to add a Tower team to a non-existant Organization
- tower_team:
- name: Test Team
- organization: Missing Organization
- state: present
- register: result
- ignore_errors: yes
-
-- name: Assert a meaningful error was provided for the failed Tower team creation
- assert:
- that:
- - "'The requested object could not be found.' in result.msg"
-
-- name: Create a Tower team
- tower_team:
- name: Test Team
- organization: Default
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Delete a Tower team
- tower_team:
- name: Test Team
- organization: Default
- state: absent
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Check module fails with correct msg
- tower_team:
- name: Test Team
- organization: Non Existing Org
- state: present
- register: result
- ignore_errors: true
-
-- assert:
- that:
- - "result.msg =='Failed to update team, organization not found: The requested object could not be found.'"
diff --git a/test/integration/targets/tower_user/aliases b/test/integration/targets/tower_user/aliases
deleted file mode 100644
index 229eebe6c9..0000000000
--- a/test/integration/targets/tower_user/aliases
+++ /dev/null
@@ -1,2 +0,0 @@
-cloud/tower
-shippable/tower/group1
diff --git a/test/integration/targets/tower_user/tasks/main.yml b/test/integration/targets/tower_user/tasks/main.yml
deleted file mode 100644
index 41264b63b4..0000000000
--- a/test/integration/targets/tower_user/tasks/main.yml
+++ /dev/null
@@ -1,93 +0,0 @@
-- name: Create a User
- tower_user:
- first_name: Joe
- last_name: User
- username: joe
- password: "{{ 65535 | random | to_uuid }}"
- email: joe@example.org
- state: present
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Delete a User
- tower_user:
- username: joe
- email: joe@example.org
- state: absent
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Create an Auditor
- tower_user:
- first_name: Joe
- last_name: Auditor
- username: joe
- password: "{{ 65535 | random | to_uuid }}"
- email: joe@example.org
- state: present
- auditor: true
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Delete an Auditor
- tower_user:
- username: joe
- email: joe@example.org
- state: absent
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Create a Superuser
- tower_user:
- first_name: Joe
- last_name: Super
- username: joe
- password: "{{ 65535 | random | to_uuid }}"
- email: joe@example.org
- state: present
- superuser: true
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Delete a Superuser
- tower_user:
- username: joe
- email: joe@example.org
- state: absent
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Test tower SSL parameter
- tower_user:
- first_name: Joe
- last_name: User
- username: joe
- password: "{{ 65535 | random | to_uuid }}"
- email: joe@example.org
- state: present
- validate_certs: true
- tower_host: http://foo.invalid
- ignore_errors: true
- register: result
-
-- assert:
- that:
- - "'not verify ssl with non-https protocol' in (result.module_stdout + result.module_stderr)"
diff --git a/test/integration/targets/tower_workflow_launch/aliases b/test/integration/targets/tower_workflow_launch/aliases
deleted file mode 100644
index 229eebe6c9..0000000000
--- a/test/integration/targets/tower_workflow_launch/aliases
+++ /dev/null
@@ -1,2 +0,0 @@
-cloud/tower
-shippable/tower/group1
diff --git a/test/integration/targets/tower_workflow_launch/files/tower_assets.json b/test/integration/targets/tower_workflow_launch/files/tower_assets.json
deleted file mode 100644
index 4ebe8f8576..0000000000
--- a/test/integration/targets/tower_workflow_launch/files/tower_assets.json
+++ /dev/null
@@ -1,46 +0,0 @@
-[
- {
- "asset_relation": {
- "workflow_nodes": [
- {
- "name": "node0",
- "unified_job_type": "job",
- "success_nodes": [
- "node1"
- ],
- "failure_nodes": [],
- "unified_job_name": "Demo Job Template",
- "always_nodes": []
- },
- {
- "name": "node1",
- "unified_job_type": "job",
- "success_nodes": [],
- "failure_nodes": [],
- "unified_job_name": "Demo Job Template",
- "always_nodes": []
- }
- ],
- "roles": [
- {
- "team": [],
- "name": "Execute",
- "user": []
- },
- {
- "team": [],
- "name": "Admin",
- "user": []
- },
- {
- "team": [],
- "name": "Read",
- "user": []
- }
- ],
- "survey_spec": {}
- },
- "asset_type": "workflow",
- "name": "Success Workflow"
- },
-]
diff --git a/test/integration/targets/tower_workflow_launch/tasks/main.yml b/test/integration/targets/tower_workflow_launch/tasks/main.yml
deleted file mode 100644
index c4d791a931..0000000000
--- a/test/integration/targets/tower_workflow_launch/tasks/main.yml
+++ /dev/null
@@ -1,83 +0,0 @@
-- name: Get unified job template ID for Demo Job Template"
- uri:
- url: "https://{{ tower_host }}/api/v2/unified_job_templates/?name=Demo+Job+Template"
- method: GET
- password: "{{ tower_password }}"
- user: "{{ tower_username }}"
- validate_certs: False
- force_basic_auth: true
- register: unified_job
-
-- name: Build workflow
- uri:
- url: "https://{{ tower_host }}/api/v2/workflow_job_templates/"
- body:
- name: "Success Template"
- variables: "---"
- extra_vars: ""
- body_format: 'json'
- method: 'POST'
- password: "{{ tower_password }}"
- status_code: 201
- user: "{{ tower_username }}"
- validate_certs: False
- force_basic_auth: true
- register: workflow
-
-- name: Add a node
- uri:
- url: "https://{{ tower_host }}/api/v2/workflow_job_templates/{{ workflow.json.id }}/workflow_nodes/"
- body:
- credential: null
- diff_mode: null
- extra_data: {}
- inventory: null
- job_tags: null
- job_type: null
- limit: null
- skip_tags: null
- unified_job_template: "{{ unified_job.json.results[0].id }}"
- verbosity: null
- body_format: 'json'
- method: 'POST'
- password: "{{ tower_password }}"
- status_code: 201
- user: "{{ tower_username }}"
- validate_certs: False
- force_basic_auth: true
- register: node1
-
-- name: Add a node
- uri:
- url: "https://{{ tower_host }}/api/v2/workflow_job_templates/{{ workflow.json.id }}/workflow_nodes/"
- body:
- credential: null
- diff_mode: null
- extra_data: {}
- inventory: null
- job_tags: null
- job_type: null
- limit: null
- skip_tags: null
- unified_job_template: "{{ unified_job.json.results[0].id }}"
- verbosity: null
- body_format: 'json'
- method: 'POST'
- password: "{{ tower_password }}"
- status_code: 201
- user: "{{ tower_username }}"
- validate_certs: False
- force_basic_auth: true
- register: node2
-
-- name: "Link nodes {{ node2.json.id }} to {{ node1.json.id }}"
- uri:
- url: "https://{{ tower_host }}/api/v2/workflow_job_template_nodes/{{ node1.json.id }}/success_nodes/"
- body: '{ "id": {{ node2.json.id }} }'
- body_format: 'json'
- method: 'POST'
- password: "{{ tower_password }}"
- status_code: 204
- user: "{{ tower_username }}"
- validate_certs: False
- force_basic_auth: true
diff --git a/test/integration/targets/tower_workflow_launch/tests/validate.yml b/test/integration/targets/tower_workflow_launch/tests/validate.yml
deleted file mode 100644
index e1bc593e83..0000000000
--- a/test/integration/targets/tower_workflow_launch/tests/validate.yml
+++ /dev/null
@@ -1,99 +0,0 @@
-- name: Run a workflow with no parameters
- tower_workflow_launch:
- validate_certs: False
- ignore_errors: true
- register: result1
-
-- assert:
- that:
- - result1.failed
- - "'missing required arguments' in result1.msg"
-
-- name: Fail no connect to Tower server
- tower_workflow_launch:
- tower_host: 127.0.0.1:22
- validate_certs: False
- workflow_template: "Here"
- ignore_errors: True
- register: result2
-
-- assert:
- that:
- - result2.failed
- - "'Failed to reach Tower' in result2.msg"
-
-- name: Connect to Tower server but request an invalid workflow
- tower_workflow_launch:
- validate_certs: False
- workflow_template: "Does Not Exist"
- ignore_errors: true
- register: result3
-
-- assert:
- that:
- - result3.failed
- - "'The requested object could not be found' in result3.msg"
-
-- name: Connect to Tower in check_mode with a valid workflow name
- tower_workflow_launch:
- validate_certs: False
- workflow_template: "Success Workflow"
- check_mode: True
- ignore_errors: true
- register: result4
-
-- assert:
- that:
- - not result4.failed
- - "'Check mode passed' in result4.msg"
-
-- name: Connect to Tower in check_mode with a valid workflow id
- tower_workflow_launch:
- validate_certs: False
- workflow_template: 9999999
- check_mode: True
- ignore_errors: true
- register: result5
-
-- assert:
- that:
- - result5.failed
- - "'The requested object could not be found' in result5.msg"
-
-- name: Run the workflow without waiting (this should just give us back a job ID)
- tower_workflow_launch:
- validate_certs: False
- workflow_template: "Success Workflow"
- wait: False
- ignore_errors: True
- register: result6
-
-- assert:
- that:
- - not result6.failed
- - "'id' in result6['job_info']"
-
-- name: Kick off a workflow and wait for it
- tower_workflow_launch:
- validate_certs: False
- workflow_template: "Success Workflow"
- ignore_errors: True
- register: result7
-
-- assert:
- that:
- - not result7.failed
- - "'id' in result7['job_info']"
-
-- name: Kick off a workflow and wait for it, but only for a second
- tower_workflow_launch:
- validate_certs: False
- workflow_template: "Success Workflow"
- timeout: 1
- ignore_errors: True
- register: result8
-
-- assert:
- that:
- - result8.failed
- - "'Monitoring aborted due to timeout' in result8.msg"
diff --git a/test/integration/targets/tower_workflow_template/aliases b/test/integration/targets/tower_workflow_template/aliases
deleted file mode 100644
index 229eebe6c9..0000000000
--- a/test/integration/targets/tower_workflow_template/aliases
+++ /dev/null
@@ -1,2 +0,0 @@
-cloud/tower
-shippable/tower/group1
diff --git a/test/integration/targets/tower_workflow_template/tasks/main.yml b/test/integration/targets/tower_workflow_template/tasks/main.yml
deleted file mode 100644
index 648c67adab..0000000000
--- a/test/integration/targets/tower_workflow_template/tasks/main.yml
+++ /dev/null
@@ -1,105 +0,0 @@
----
-- name: Create an SCM Credential
- tower_credential:
- name: SCM Credential for JT
- organization: Default
- kind: scm
-
-- name: Create a Demo Project
- tower_project:
- name: Job Template Test Project
- organization: Default
- state: present
- scm_type: git
- scm_url: https://github.com/ansible/ansible-tower-samples.git
- scm_credential: SCM Credential for JT
- register: result
-
-- name: Update the project (to clone the git repo)
- uri:
- url: "https://{{ tower_host }}/api/v2/projects/{{ result.id }}/update/"
- method: POST
- user: "{{ tower_username }}"
- password: "{{ tower_password }}"
- validate_certs: false
- status_code: 202
- force_basic_auth: true
-
-- name: Wait for the project to be status=successful
- uri:
- url: "https://{{ tower_host }}/api/v2/projects/{{ result.id }}/"
- method: GET
- user: "{{ tower_username }}"
- password: "{{ tower_password }}"
- validate_certs: false
- force_basic_auth: true
- return_content: true
- register: result
- until: result.json.status == "successful"
- retries: 60
- delay: 1
-
-- name: Create a Job Template
- tower_job_template:
- name: my-job-1
- project: Job Template Test Project
- inventory: Demo Inventory
- playbook: hello_world.yml
- credential: Demo Credential
- job_type: run
- state: present
-
-- name: Create a second Job Template
- tower_job_template:
- name: my-job-2
- project: Job Template Test Project
- inventory: Demo Inventory
- playbook: hello_world.yml
- credential: Demo Credential
- job_type: run
- state: present
-
-- name: Add a Survey to second Job Template
- tower_job_template:
- name: my-job-2
- project: Job Template Test Project
- inventory: Demo Inventory
- playbook: hello_world.yml
- credential: Demo Credential
- job_type: run
- state: present
- survey_enabled: yes
- survey_spec: '{"spec": [{"index": 0, "question_name": "my question?", "default": "mydef", "variable": "myvar", "type": "text", "required": false}], "description": "test", "name": "test"}'
-
-
-- name: Create a workflow job template
- tower_workflow_template:
- name: my-workflow
- schema: '[{"success": [{"job_template": "my-job-1"}], "job_template": "my-job-2"}]'
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Delete a workflow job template
- tower_workflow_template:
- name: my-workflow
- state: absent
- register: result
-
-- assert:
- that:
- - "result is changed"
-
-- name: Check module fails with correct msg
- tower_workflow_template:
- name: my-workflow
- organization: Non Existing Organization
- schema: '[{"success": [{"job_template": "my-job-1"}], "job_template": "my-job-2"}]'
- register: result
- ignore_errors: true
-
-- assert:
- that:
- - "result.msg =='Failed to update organization source,organization not found: The requested object could not be found.'" \ No newline at end of file