summaryrefslogtreecommitdiffstats
path: root/awx_collection/tests/integration
diff options
context:
space:
mode:
authorSeth Foster <fosterbseth@gmail.com>2021-04-29 17:58:41 +0200
committerSeth Foster <fosterbseth@gmail.com>2021-06-08 20:33:23 +0200
commit7a63785255e04808d5cb8ca330d2fee31190cd9f (patch)
tree1bd7c13fb083de0865ba57a900730a969e36f970 /awx_collection/tests/integration
parentregex replace tower_*: to '' (diff)
downloadawx-7a63785255e04808d5cb8ca330d2fee31190cd9f.tar.xz
awx-7a63785255e04808d5cb8ca330d2fee31190cd9f.zip
more rename, mostly in test
Diffstat (limited to 'awx_collection/tests/integration')
-rw-r--r--awx_collection/tests/integration/targets/ad_hoc_command/tasks/main.yml6
-rw-r--r--awx_collection/tests/integration/targets/ad_hoc_command_cancel/tasks/main.yml10
-rw-r--r--awx_collection/tests/integration/targets/ad_hoc_command_wait/tasks/main.yml14
-rw-r--r--awx_collection/tests/integration/targets/credential_input_source/tasks/main.yml6
-rw-r--r--awx_collection/tests/integration/targets/credential_type/tasks/main.yml4
-rw-r--r--awx_collection/tests/integration/targets/demo_data/tasks/main.yml4
-rw-r--r--awx_collection/tests/integration/targets/group/tasks/main.yml2
-rw-r--r--awx_collection/tests/integration/targets/instance_group/tasks/main.yml8
-rw-r--r--awx_collection/tests/integration/targets/inventory/tasks/main.yml4
-rw-r--r--awx_collection/tests/integration/targets/inventory_source/tasks/main.yml4
-rw-r--r--awx_collection/tests/integration/targets/inventory_source_update/tasks/main.yml16
-rw-r--r--awx_collection/tests/integration/targets/job_cancel/tasks/main.yml8
-rw-r--r--awx_collection/tests/integration/targets/job_launch/tasks/main.yml30
-rw-r--r--awx_collection/tests/integration/targets/job_list/tasks/main.yml8
-rw-r--r--awx_collection/tests/integration/targets/job_template/tasks/main.yml50
-rw-r--r--awx_collection/tests/integration/targets/job_wait/tasks/main.yml32
-rw-r--r--awx_collection/tests/integration/targets/lookup_api_plugin/tasks/main.yml12
-rw-r--r--awx_collection/tests/integration/targets/notification_template/tasks/main.yml30
-rw-r--r--awx_collection/tests/integration/targets/organization/tasks/main.yml4
-rw-r--r--awx_collection/tests/integration/targets/project/tasks/main.yml8
-rw-r--r--awx_collection/tests/integration/targets/project_manual/tasks/create_project_dir.yml4
-rw-r--r--awx_collection/tests/integration/targets/project_update/tasks/main.yml6
-rw-r--r--awx_collection/tests/integration/targets/role/tasks/main.yml6
-rw-r--r--awx_collection/tests/integration/targets/token/tasks/main.yml8
-rw-r--r--awx_collection/tests/integration/targets/workflow_job_template/tasks/main.yml74
-rw-r--r--awx_collection/tests/integration/targets/workflow_launch/tasks/main.yml42
26 files changed, 200 insertions, 200 deletions
diff --git a/awx_collection/tests/integration/targets/ad_hoc_command/tasks/main.yml b/awx_collection/tests/integration/targets/ad_hoc_command/tasks/main.yml
index 280bd42a79..b5e8a9f529 100644
--- a/awx_collection/tests/integration/targets/ad_hoc_command/tasks/main.yml
+++ b/awx_collection/tests/integration/targets/ad_hoc_command/tasks/main.yml
@@ -35,7 +35,7 @@
state: present
- name: Launch an Ad Hoc Command waiting for it to finish
- tower_ad_hoc_command:
+ ad_hoc_command:
inventory: "{{ inv_name }}"
credential: "{{ ssh_cred_name }}"
module_name: "command"
@@ -49,7 +49,7 @@
- "result.status == 'successful'"
- name: Launch an Ad Hoc Command without module argument
- tower_ad_hoc_command:
+ ad_hoc_command:
inventory: "Demo Inventory"
credential: "{{ ssh_cred_name }}"
module_name: "ping"
@@ -62,7 +62,7 @@
- "result.status == 'successful'"
- name: Check module fails with correct msg
- tower_ad_hoc_command:
+ ad_hoc_command:
inventory: "{{ inv_name }}"
credential: "{{ ssh_cred_name }}"
module_name: "Does not exist"
diff --git a/awx_collection/tests/integration/targets/ad_hoc_command_cancel/tasks/main.yml b/awx_collection/tests/integration/targets/ad_hoc_command_cancel/tasks/main.yml
index eab310b1ab..716bd1507c 100644
--- a/awx_collection/tests/integration/targets/ad_hoc_command_cancel/tasks/main.yml
+++ b/awx_collection/tests/integration/targets/ad_hoc_command_cancel/tasks/main.yml
@@ -35,7 +35,7 @@
state: present
- name: Launch an Ad Hoc Command
- tower_ad_hoc_command:
+ ad_hoc_command:
inventory: "{{ inv_name }}"
credential: "{{ ssh_cred_name }}"
module_name: "command"
@@ -47,7 +47,7 @@
- "command is changed"
- name: Timeout waiting for the command to cancel
- tower_ad_hoc_command_cancel:
+ ad_hoc_command_cancel:
command_id: "{{ command.id }}"
timeout: -1
register: results
@@ -59,7 +59,7 @@
- "results['msg'] == 'Monitoring of ad hoc command aborted due to timeout'"
- name: Cancel the command with hard error if it's not running
- tower_ad_hoc_command_cancel:
+ ad_hoc_command_cancel:
command_id: "{{ command.id }}"
fail_if_not_running: true
register: results
@@ -70,7 +70,7 @@
- results is failed
- name: Cancel an already canceled command (assert failure)
- tower_ad_hoc_command_cancel:
+ ad_hoc_command_cancel:
command_id: "{{ command.id }}"
fail_if_not_running: true
register: results
@@ -81,7 +81,7 @@
- results is failed
- name: Check module fails with correct msg
- tower_ad_hoc_command_cancel:
+ ad_hoc_command_cancel:
command_id: 9999999999
register: result
ignore_errors: true
diff --git a/awx_collection/tests/integration/targets/ad_hoc_command_wait/tasks/main.yml b/awx_collection/tests/integration/targets/ad_hoc_command_wait/tasks/main.yml
index fbd539330a..e92627c810 100644
--- a/awx_collection/tests/integration/targets/ad_hoc_command_wait/tasks/main.yml
+++ b/awx_collection/tests/integration/targets/ad_hoc_command_wait/tasks/main.yml
@@ -35,7 +35,7 @@
state: present
- name: Check module fails with correct msg
- tower_ad_hoc_command_wait:
+ ad_hoc_command_wait:
command_id: "99999999"
register: result
ignore_errors: true
@@ -46,7 +46,7 @@
- "result.msg == 'Unable to wait on ad hoc command 99999999; that ID does not exist in Tower.'"
- name: Launch command module with sleep 10
- tower_ad_hoc_command:
+ ad_hoc_command:
inventory: "{{ inv_name }}"
credential: "{{ ssh_cred_name }}"
module_name: "command"
@@ -58,7 +58,7 @@
- command is changed
- name: Wait for the Job to finish
- tower_ad_hoc_command_wait:
+ ad_hoc_command_wait:
command_id: "{{ command.id }}"
register: wait_results
@@ -70,7 +70,7 @@
- "'id' in wait_results"
- name: Launch a long running command
- tower_ad_hoc_command:
+ ad_hoc_command:
inventory: "{{ inv_name }}"
credential: "{{ ssh_cred_name }}"
module_name: "command"
@@ -82,7 +82,7 @@
- command is changed
- name: Timeout waiting for the command to complete
- tower_ad_hoc_command_wait:
+ ad_hoc_command_wait:
command_id: "{{ command.id }}"
timeout: 1
ignore_errors: true
@@ -95,13 +95,13 @@
- "'id' in wait_results"
- name: Async cancel the long-running command
- tower_ad_hoc_command_cancel:
+ ad_hoc_command_cancel:
command_id: "{{ command.id }}"
async: 3600
poll: 0
- name: Wait for the command to exit on cancel
- tower_ad_hoc_command_wait:
+ ad_hoc_command_wait:
command_id: "{{ command.id }}"
register: wait_results
ignore_errors: true
diff --git a/awx_collection/tests/integration/targets/credential_input_source/tasks/main.yml b/awx_collection/tests/integration/targets/credential_input_source/tasks/main.yml
index 382b105a5c..83fc112e76 100644
--- a/awx_collection/tests/integration/targets/credential_input_source/tasks/main.yml
+++ b/awx_collection/tests/integration/targets/credential_input_source/tasks/main.yml
@@ -40,7 +40,7 @@
- "target_cred_result is changed"
- name: Add credential Input Source
- tower_credential_input_source:
+ credential_input_source:
input_field_name: password
target_credential: "{{ target_cred_result.id }}"
source_credential: "{{ src_cred_result.id }}"
@@ -66,7 +66,7 @@
register: result
- name: Change credential Input Source
- tower_credential_input_source:
+ credential_input_source:
input_field_name: password
target_credential: "{{ target_cred_name }}"
source_credential: "{{ src_cred_name }}-2"
@@ -78,7 +78,7 @@
always:
- name: Remove a Tower credential source
- tower_credential_input_source:
+ credential_input_source:
input_field_name: password
target_credential: "{{ target_cred_name }}"
state: absent
diff --git a/awx_collection/tests/integration/targets/credential_type/tasks/main.yml b/awx_collection/tests/integration/targets/credential_type/tasks/main.yml
index a38f2eeaae..bf4bb19933 100644
--- a/awx_collection/tests/integration/targets/credential_type/tasks/main.yml
+++ b/awx_collection/tests/integration/targets/credential_type/tasks/main.yml
@@ -4,7 +4,7 @@
cred_type_name: "AWX-Collection-tests-tower_credential_type-cred-type-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
- name: Add Tower credential type
- tower_credential_type:
+ credential_type:
description: Credential type for Test
name: "{{ cred_type_name }}"
kind: cloud
@@ -17,7 +17,7 @@
- "result is changed"
- name: Remove a Tower credential type
- tower_credential_type:
+ credential_type:
name: "{{ result.id }}"
state: absent
register: result
diff --git a/awx_collection/tests/integration/targets/demo_data/tasks/main.yml b/awx_collection/tests/integration/targets/demo_data/tasks/main.yml
index 06ac9a971f..db152671bd 100644
--- a/awx_collection/tests/integration/targets/demo_data/tasks/main.yml
+++ b/awx_collection/tests/integration/targets/demo_data/tasks/main.yml
@@ -9,7 +9,7 @@
scm_type: git
state: absent
loop: >
- {{ query('awx.awx.tower_api', 'projects',
+ {{ query('awx.awx.controller_api', 'projects',
query_params={'organization__isnull': true, 'name': 'Demo Project'})
}}
loop_control:
@@ -38,7 +38,7 @@
register: result
- name: Assure that demo job template exists
- tower_job_template:
+ job_template:
name: "Demo Job Template"
project: "Demo Project"
inventory: "Demo Inventory"
diff --git a/awx_collection/tests/integration/targets/group/tasks/main.yml b/awx_collection/tests/integration/targets/group/tasks/main.yml
index 2fc4e4a42b..313cb55ae4 100644
--- a/awx_collection/tests/integration/targets/group/tasks/main.yml
+++ b/awx_collection/tests/integration/targets/group/tasks/main.yml
@@ -93,7 +93,7 @@
- name: "Find number of hosts in {{ group_name1 }}"
set_fact:
- group1_host_count: "{{ lookup('awx.awx.tower_api', 'groups/{{result.id}}/all_hosts/') |length}}"
+ group1_host_count: "{{ lookup('awx.awx.controller_api', 'groups/{{result.id}}/all_hosts/') |length}}"
- assert:
that:
diff --git a/awx_collection/tests/integration/targets/instance_group/tasks/main.yml b/awx_collection/tests/integration/targets/instance_group/tasks/main.yml
index b763f5636a..8d526d7fd7 100644
--- a/awx_collection/tests/integration/targets/instance_group/tasks/main.yml
+++ b/awx_collection/tests/integration/targets/instance_group/tasks/main.yml
@@ -26,7 +26,7 @@
- "cred_result is changed"
- name: Create an Instance Group
- tower_instance_group:
+ instance_group:
name: "{{ group_name1 }}"
policy_instance_percentage: 34
policy_instance_minimum: 12
@@ -38,7 +38,7 @@
- "result is changed"
- name: Update an Instance Group
- tower_instance_group:
+ instance_group:
name: "{{ result.id }}"
policy_instance_percentage: 34
policy_instance_minimum: 24
@@ -50,7 +50,7 @@
- "result is changed"
- name: Create a container group
- tower_instance_group:
+ instance_group:
name: "{{ group_name2 }}"
credential: "{{ cred_result.id }}"
is_container_group: true
@@ -62,7 +62,7 @@
always:
- name: Delete the instance groups
- tower_instance_group:
+ instance_group:
name: "{{ item }}"
state: absent
loop:
diff --git a/awx_collection/tests/integration/targets/inventory/tasks/main.yml b/awx_collection/tests/integration/targets/inventory/tasks/main.yml
index 6d2f27094d..0171f9a0b9 100644
--- a/awx_collection/tests/integration/targets/inventory/tasks/main.yml
+++ b/awx_collection/tests/integration/targets/inventory/tasks/main.yml
@@ -13,7 +13,7 @@
- block:
- name: Create an Instance Group
- tower_instance_group:
+ instance_group:
name: "{{ group_name1 }}"
state: present
register: result
@@ -174,7 +174,7 @@
- "copy_{{ inv_name1 }}"
- name: Delete the instance groups
- tower_instance_group:
+ instance_group:
name: "{{ group_name1 }}"
state: absent
diff --git a/awx_collection/tests/integration/targets/inventory_source/tasks/main.yml b/awx_collection/tests/integration/targets/inventory_source/tasks/main.yml
index 7878e8fa22..56abbb0afa 100644
--- a/awx_collection/tests/integration/targets/inventory_source/tasks/main.yml
+++ b/awx_collection/tests/integration/targets/inventory_source/tasks/main.yml
@@ -25,7 +25,7 @@
name: "{{ openstack_inv }}"
- name: Create a source inventory
- tower_inventory_source:
+ inventory_source:
name: "{{ openstack_inv_source }}"
description: Source for Test inventory
inventory: "{{ openstack_inv }}"
@@ -42,7 +42,7 @@
- "result is changed"
- name: Delete the inventory source with an invalid cred and source_project specified
- tower_inventory_source:
+ inventory_source:
name: "{{ result.id }}"
inventory: "{{ openstack_inv }}"
credential: "Does Not Exit"
diff --git a/awx_collection/tests/integration/targets/inventory_source_update/tasks/main.yml b/awx_collection/tests/integration/targets/inventory_source_update/tasks/main.yml
index a8a78f7a87..435770302a 100644
--- a/awx_collection/tests/integration/targets/inventory_source_update/tasks/main.yml
+++ b/awx_collection/tests/integration/targets/inventory_source_update/tasks/main.yml
@@ -42,7 +42,7 @@
register: created_inventory
- name: Create an Inventory Source (specifically connected to the randomly generated org)
- tower_inventory_source:
+ inventory_source:
name: "{{ inv_source1 }}"
source: scm
source_project: "{{ project_name }}"
@@ -52,7 +52,7 @@
inventory: "{{ inv_name }}"
- name: Create Another Inventory Source
- tower_inventory_source:
+ inventory_source:
name: "{{ inv_source2 }}"
source: scm
source_project: "{{ project_name }}"
@@ -62,7 +62,7 @@
inventory: "{{ inv_name }}"
- name: Create Yet Another Inventory Source (to make lookup plugin find multiple inv sources)
- tower_inventory_source:
+ inventory_source:
name: "{{ inv_source3 }}"
source: scm
source_project: "{{ project_name }}"
@@ -72,7 +72,7 @@
inventory: "{{ inv_name }}"
- name: Test Inventory Source Update
- tower_inventory_source_update:
+ inventory_source_update:
name: "{{ inv_source2 }}"
inventory: "{{ inv_name }}"
organization: Default
@@ -83,12 +83,12 @@
- "result is changed"
- name: Test Inventory Source Update for All Sources
- tower_inventory_source_update:
+ inventory_source_update:
name: "{{ item.name }}"
inventory: "{{ inv_name }}"
organization: Default
wait: true
- loop: "{{ query('awx.awx.tower_api', 'inventory_sources', query_params={ 'inventory': created_inventory.id }, expect_objects=True, return_objects=True) }}"
+ loop: "{{ query('awx.awx.controller_api', 'inventory_sources', query_params={ 'inventory': created_inventory.id }, expect_objects=True, return_objects=True) }}"
loop_control:
label: "{{ item.name }}"
register: result
@@ -98,12 +98,12 @@
- "result is changed"
- name: Test Inventory Source Update for All Sources (using inventory_source as alias for name)
- tower_inventory_source_update:
+ inventory_source_update:
inventory_source: "{{ item.name }}"
inventory: "{{ inv_name }}"
organization: Default
wait: true
- loop: "{{ query('awx.awx.tower_api', 'inventory_sources', query_params={ 'inventory': created_inventory.id }, expect_objects=True, return_objects=True) }}"
+ loop: "{{ query('awx.awx.controller_api', 'inventory_sources', query_params={ 'inventory': created_inventory.id }, expect_objects=True, return_objects=True) }}"
loop_control:
label: "{{ item.name }}"
register: result
diff --git a/awx_collection/tests/integration/targets/job_cancel/tasks/main.yml b/awx_collection/tests/integration/targets/job_cancel/tasks/main.yml
index d949610d98..254ea89ce7 100644
--- a/awx_collection/tests/integration/targets/job_cancel/tasks/main.yml
+++ b/awx_collection/tests/integration/targets/job_cancel/tasks/main.yml
@@ -1,6 +1,6 @@
---
- name: Launch a Job Template
- tower_job_launch:
+ job_launch:
job_template: "Demo Job Template"
register: job
@@ -9,7 +9,7 @@
- "job is changed"
- name: Cancel the job
- tower_job_cancel:
+ job_cancel:
job_id: "{{ job.id }}"
register: results
@@ -18,7 +18,7 @@
- results is changed
- name: Cancel an already canceled job (assert failure)
- tower_job_cancel:
+ job_cancel:
job_id: "{{ job.id }}"
fail_if_not_running: true
register: results
@@ -29,7 +29,7 @@
- results is failed
- name: Check module fails with correct msg
- tower_job_cancel:
+ job_cancel:
job_id: 9999999999
register: result
ignore_errors: true
diff --git a/awx_collection/tests/integration/targets/job_launch/tasks/main.yml b/awx_collection/tests/integration/targets/job_launch/tasks/main.yml
index 6828fbc93e..9d98c9fe36 100644
--- a/awx_collection/tests/integration/targets/job_launch/tasks/main.yml
+++ b/awx_collection/tests/integration/targets/job_launch/tasks/main.yml
@@ -6,7 +6,7 @@
proj_name: "AWX-Collection-tests-tower_job_launch-project-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
- name: Launch a Job Template
- tower_job_launch:
+ job_launch:
job_template: "Demo Job Template"
register: result
@@ -16,7 +16,7 @@
- "result.status == 'pending'"
- name: Wait for a job template to complete
- tower_job_wait:
+ job_wait:
job_id: "{{ result.id }}"
max_interval: 10
timeout: 120
@@ -28,7 +28,7 @@
- "result.status == 'successful'"
- name: Check module fails with correct msg
- tower_job_launch:
+ job_launch:
job_template: "Non_Existing_Job_Template"
inventory: "Demo Inventory"
register: result
@@ -41,7 +41,7 @@
- "'Non_Existing_Job_Template' in result.msg"
- name: Create a Job Template for testing prompt on launch
- tower_job_template:
+ job_template:
name: "{{ jt_name1 }}"
project: Demo Project
playbook: hello_world.yml
@@ -54,7 +54,7 @@
register: result
- name: Launch job template with inventory and credential for prompt on launch
- tower_job_launch:
+ job_launch:
job_template: "{{ jt_name1 }}"
inventory: "Demo Inventory"
credential: "Demo Credential"
@@ -77,7 +77,7 @@
scm_url: https://github.com/ansible/test-playbooks
- name: Create the job template with survey
- tower_job_template:
+ job_template:
name: "{{ jt_name2 }}"
project: "{{ proj_name }}"
playbook: debug.yml
@@ -114,7 +114,7 @@
new_question: true
- name: Kick off a job template with survey
- tower_job_launch:
+ job_launch:
job_template: "{{ jt_name2 }}"
extra_vars:
basic_name: My First Variable
@@ -127,14 +127,14 @@
- result is not failed
- name: Prompt the job templates extra_vars on launch
- tower_job_template:
+ job_template:
name: "{{ jt_name2 }}"
state: present
ask_variables_on_launch: true
- name: Kick off a job template with extra_vars
- tower_job_launch:
+ job_launch:
job_template: "{{ jt_name2 }}"
extra_vars:
basic_name: My First Variable
@@ -148,7 +148,7 @@
- result is not failed
- name: Create a Job Template for testing extra_vars
- tower_job_template:
+ job_template:
name: "{{ jt_name2 }}"
project: "{{ proj_name }}"
playbook: debug.yml
@@ -161,7 +161,7 @@
register: result
- name: Launch job template with inventory and credential for prompt on launch
- tower_job_launch:
+ job_launch:
job_template: "{{ jt_name2 }}"
organization: Default
register: result
@@ -171,7 +171,7 @@
- "result is changed"
- name: Wait for a job template to complete
- tower_job_wait:
+ job_wait:
job_id: "{{ result.id }}"
max_interval: 10
timeout: 120
@@ -183,7 +183,7 @@
- "result.status == 'successful'"
- name: Get the job
- tower_job_list:
+ job_list:
query: {"id": "{{result.id}}"}
register: result
@@ -192,7 +192,7 @@
- '{"foo": "bar"} | to_json in result.results[0].extra_vars'
- name: Delete the first jt
- tower_job_template:
+ job_template:
name: "{{ jt_name1 }}"
project: Demo Project
playbook: hello_world.yml
@@ -204,7 +204,7 @@
- "result is changed"
- name: Delete the second jt
- tower_job_template:
+ job_template:
name: "{{ jt_name2 }}"
project: "{{ proj_name }}"
playbook: debug.yml
diff --git a/awx_collection/tests/integration/targets/job_list/tasks/main.yml b/awx_collection/tests/integration/targets/job_list/tasks/main.yml
index a883f28d87..04495bfcba 100644
--- a/awx_collection/tests/integration/targets/job_list/tasks/main.yml
+++ b/awx_collection/tests/integration/targets/job_list/tasks/main.yml
@@ -1,6 +1,6 @@
---
- name: Launch a Job Template
- tower_job_launch:
+ job_launch:
job_template: "Demo Job Template"
register: job
@@ -10,7 +10,7 @@
- "job.status == 'pending'"
- name: List jobs w/ a matching primary key
- tower_job_list:
+ job_list:
query: {"id": "{{ job.id }}"}
register: matching_jobs
@@ -19,7 +19,7 @@
- "{{ matching_jobs.count }} == 1"
- name: List failed jobs (which don't exist)
- tower_job_list:
+ job_list:
status: failed
query: {"id": "{{ job.id }}"}
register: successful_jobs
@@ -29,7 +29,7 @@
- "{{ successful_jobs.count }} == 0"
- name: Get ALL result pages!
- tower_job_list:
+ job_list:
all_pages: true
register: all_page_query
diff --git a/awx_collection/tests/integration/targets/job_template/tasks/main.yml b/awx_collection/tests/integration/targets/job_template/tasks/main.yml
index b32af29e92..7dd1daad86 100644
--- a/awx_collection/tests/integration/targets/job_template/tasks/main.yml
+++ b/awx_collection/tests/integration/targets/job_template/tasks/main.yml
@@ -61,7 +61,7 @@
- "{{ org_name }}"
- name: Create an Instance Group
- tower_instance_group:
+ instance_group:
name: "{{ group_name1 }}"
state: present
register: result
@@ -71,7 +71,7 @@
- "result is changed"
- name: Add email notification
- tower_notification_template:
+ notification_template:
name: "{{ email_not }}"
organization: Default
notification_type: email
@@ -87,7 +87,7 @@
state: present
- name: Add webhook notification
- tower_notification_template:
+ notification_template:
name: "{{ webhook_not }}"
organization: Default
notification_type: webhook
@@ -98,7 +98,7 @@
register: result
- name: Create Job Template 1
- tower_job_template:
+ job_template:
name: "{{ jt1 }}"
project: "{{ proj1 }}"
inventory: Demo Inventory
@@ -117,7 +117,7 @@
- "jt1_result is changed"
- name: Add a credential to this JT
- tower_job_template:
+ job_template:
name: "{{ jt1 }}"
project: "{{ proj_result.id }}"
playbook: hello_world.yml
@@ -130,7 +130,7 @@
- "result is changed"
- name: Try to add the same credential to this JT
- tower_job_template:
+ job_template:
name: "{{ jt1_result.id }}"
project: "{{ proj1 }}"
playbook: hello_world.yml
@@ -143,7 +143,7 @@
- "result is not changed"
- name: Add another credential to this JT
- tower_job_template:
+ job_template:
name: "{{ jt1 }}"
project: "{{ proj1 }}"
playbook: hello_world.yml
@@ -157,7 +157,7 @@
- "result is changed"
- name: Remove a credential for this JT
- tower_job_template:
+ job_template:
name: "{{ jt1 }}"
project: "{{ proj1 }}"
playbook: hello_world.yml
@@ -170,7 +170,7 @@
- "result is changed"
- name: Remove all credentials from this JT
- tower_job_template:
+ job_template:
name: "{{ jt1 }}"
project: "{{ proj1 }}"
playbook: hello_world.yml
@@ -182,13 +182,13 @@
- "result is changed"
- name: Copy Job Template
- tower_job_template:
+ job_template:
name: "copy_{{ jt1 }}"
copy_from: "{{ jt1 }}"
state: "present"
- name: Delete copied Job Template
- tower_job_template:
+ job_template:
name: "copy_{{ jt1 }}"
job_type: run
state: absent
@@ -196,7 +196,7 @@
# This doesnt work if you include the credentials parameter
- name: Delete Job Template 1
- tower_job_template:
+ job_template:
name: "{{ jt1 }}"
playbook: hello_world.yml
job_type: run
@@ -211,7 +211,7 @@
- "result is changed"
- name: Create Job Template 2
- tower_job_template:
+ job_template:
name: "{{ jt2 }}"
organization: Default
project: "{{ proj1 }}"
@@ -229,7 +229,7 @@
- "result is changed"
- name: Add survey to Job Template 2
- tower_job_template:
+ job_template:
name: "{{ jt2 }}"
survey_enabled: true
survey_spec:
@@ -251,7 +251,7 @@
- "result is changed"
- name: Re Add survey to Job Template 2
- tower_job_template:
+ job_template:
name: "{{ jt2 }}"
survey_enabled: true
survey_spec:
@@ -273,7 +273,7 @@
- "result is not changed"
- name: Add question to survey to Job Template 2
- tower_job_template:
+ job_template:
name: "{{ jt2 }}"
survey_enabled: true
survey_spec:
@@ -300,7 +300,7 @@
- "result is changed"
- name: Remove survey from Job Template 2
- tower_job_template:
+ job_template:
name: "{{ jt2 }}"
survey_enabled: false
survey_spec: {}
@@ -311,7 +311,7 @@
- "result is changed"
- name: Add started notifications to Job Template 2
- tower_job_template:
+ job_template:
name: "{{ jt2 }}"
notification_templates_started:
- "{{ email_not }}"
@@ -323,7 +323,7 @@
- "result is changed"
- name: Re Add started notifications to Job Template 2
- tower_job_template:
+ job_template:
name: "{{ jt2 }}"
notification_templates_started:
- "{{ email_not }}"
@@ -335,7 +335,7 @@
- "result is not changed"
- name: Add success notifications to Job Template 2
- tower_job_template:
+ job_template:
name: "{{ jt2 }}"
notification_templates_success:
- "{{ email_not }}"
@@ -347,7 +347,7 @@
- "result is changed"
- name: Remove "on start" webhook notification from Job Template 2
- tower_job_template:
+ job_template:
name: "{{ jt2 }}"
notification_templates_started:
- "{{ email_not }}"
@@ -359,7 +359,7 @@
- name: Delete Job Template 2
- tower_job_template:
+ job_template:
name: "{{ jt2 }}"
project: "{{ proj1 }}"
inventory: Demo Inventory
@@ -406,18 +406,18 @@
# You can't delete a label directly so no cleanup needed
- name: Delete email notification
- tower_notification_template:
+ notification_template:
name: "{{ email_not }}"
organization: Default
state: absent
- name: Delete the instance groups
- tower_instance_group:
+ instance_group:
name: "{{ group_name1 }}"
state: absent
- name: Delete webhook notification
- tower_notification_template:
+ notification_template:
name: "{{ webhook_not }}"
organization: Default
state: absent
diff --git a/awx_collection/tests/integration/targets/job_wait/tasks/main.yml b/awx_collection/tests/integration/targets/job_wait/tasks/main.yml
index d21e75b8e6..5187dc7da8 100644
--- a/awx_collection/tests/integration/targets/job_wait/tasks/main.yml
+++ b/awx_collection/tests/integration/targets/job_wait/tasks/main.yml
@@ -13,7 +13,7 @@
organization: Default
- name: Create a job template
- tower_job_template:
+ job_template:
name: "{{ jt_name }}"
playbook: "sleep.yml"
job_type: run
@@ -23,7 +23,7 @@
sleep_interval: 300
- name: Check deprecation warnings
- tower_job_wait:
+ job_wait:
min_interval: 10
max_interval: 20
job_id: "99999999"
@@ -35,7 +35,7 @@
- "'Min and max interval have been deprecated, please use interval instead; interval will be set to 15'"
- name: Validate that interval superceeds min/max
- tower_job_wait:
+ job_wait:
min_interval: 10
max_interval: 20
interval: 12
@@ -49,7 +49,7 @@
'min and max interval have been depricated, please use interval instead, interval will be set to 12'"
- name: Check module fails with correct msg
- tower_job_wait:
+ job_wait:
job_id: "99999999"
register: result
ignore_errors: true
@@ -61,7 +61,7 @@
'Unable to wait on job 99999999; that ID does not exist in Tower.'"
- name: Launch Demo Job Template (take happy path)
- tower_job_launch:
+ job_launch:
job_template: "Demo Job Template"
register: job
@@ -70,7 +70,7 @@
- job is changed
- name: Wait for the Job to finish
- tower_job_wait:
+ job_wait:
job_id: "{{ job.id }}"
register: wait_results
@@ -82,7 +82,7 @@
- "'id' in wait_results"
- name: Launch a long running job
- tower_job_launch:
+ job_launch:
job_template: "{{ jt_name }}"
register: job
@@ -91,7 +91,7 @@
- job is changed
- name: Timeout waiting for the job to complete
- tower_job_wait:
+ job_wait:
job_id: "{{ job.id }}"
timeout: 5
ignore_errors: true
@@ -104,13 +104,13 @@
- "'id' in wait_results"
- name: Async cancel the long running job
- tower_job_cancel:
+ job_cancel:
job_id: "{{ job.id }}"
async: 3600
poll: 0
- name: Wait for the job to exit on cancel
- tower_job_wait:
+ job_wait:
job_id: "{{ job.id }}"
register: wait_results
ignore_errors: true
@@ -122,7 +122,7 @@
- "wait_results.msg == 'Job with id {{ job.id }} failed' or 'Job with id={{ job.id }} failed, error: Job failed.'"
- name: Delete the job template
- tower_job_template:
+ job_template:
name: "{{ jt_name }}"
playbook: "sleep.yml"
job_type: run
@@ -147,25 +147,25 @@
wfjt_name2: "AWX-Collection-tests-tower_workflow_launch--wfjt1-{{ test_id1 }}"
- name: Create our workflow
- tower_workflow_job_template:
+ workflow_job_template:
name: "{{ wfjt_name2 }}"
state: present
- name: Add a node
- tower_workflow_job_template_node:
+ workflow_job_template_node:
workflow_job_template: "{{ wfjt_name2 }}"
unified_job_template: "Demo Job Template"
identifier: leaf
register: new_node
- name: Kick off a workflow
- tower_workflow_launch:
+ workflow_launch:
workflow_template: "{{ wfjt_name2 }}"
ignore_errors: true
register: workflow
- name: Wait for the Workflow Job to finish
- tower_job_wait:
+ job_wait:
job_id: "{{ workflow.job_info.id }}"
job_type: "workflow_jobs"
register: wait_workflow_results
@@ -178,6 +178,6 @@
- "'id' in wait_workflow_results"
- name: Clean up test workflow
- tower_workflow_job_template:
+ workflow_job_template:
name: "{{ wfjt_name2 }}"
state: absent
diff --git a/awx_collection/tests/integration/targets/lookup_api_plugin/tasks/main.yml b/awx_collection/tests/integration/targets/lookup_api_plugin/tasks/main.yml
index 7c4ea04799..416ec855bd 100644
--- a/awx_collection/tests/integration/targets/lookup_api_plugin/tasks/main.yml
+++ b/awx_collection/tests/integration/targets/lookup_api_plugin/tasks/main.yml
@@ -21,7 +21,7 @@
- name: Generate the name of our plugin
set_fact:
- plugin_name: "{{ tower_meta.prefix }}.tower_api"
+ plugin_name: "{{ tower_meta.prefix }}.controller_api"
- name: Create all of our users
user:
@@ -177,7 +177,7 @@
# DOCS Example Tests
- name: Load the UI settings
set_fact:
- tower_settings: "{{ lookup('awx.awx.tower_api', 'settings/ui') }}"
+ tower_settings: "{{ lookup('awx.awx.controller_api', 'settings/ui') }}"
- assert:
that:
@@ -185,7 +185,7 @@
- name: Display the usernames of all admin users
debug:
- msg: "Admin users: {{ query('awx.awx.tower_api', 'users', query_params={ 'is_superuser': true }) | map(attribute='username') | join(', ') }}"
+ msg: "Admin users: {{ query('awx.awx.controller_api', 'users', query_params={ 'is_superuser': true }) | map(attribute='username') | join(', ') }}"
register: results
- assert:
@@ -195,7 +195,7 @@
- name: debug all organizations in a loop # use query to return a list
debug:
msg: "Organization description={{ item['description'] }} id={{ item['id'] }}"
- loop: "{{ query('awx.awx.tower_api', 'organizations') }}"
+ loop: "{{ query('awx.awx.controller_api', 'organizations') }}"
loop_control:
label: "{{ item['name'] }}"
@@ -206,7 +206,7 @@
user: "{{ usernames[0] }}"
state: absent
register: tower_role_revoke
- when: "query('awx.awx.tower_api', 'users', query_params={ 'username': 'DNE_TESTING' }) | length == 1"
+ when: "query('awx.awx.controller_api', 'users', query_params={ 'username': 'DNE_TESTING' }) | length == 1"
- assert:
that:
@@ -218,7 +218,7 @@
inventory: "Demo Inventory"
hosts: >-
{{ query(
- 'awx.awx.tower_api',
+ 'awx.awx.controller_api',
'hosts',
query_params={ 'name__endswith' : test_id, },
) | map(attribute='name') | list }}
diff --git a/awx_collection/tests/integration/targets/notification_template/tasks/main.yml b/awx_collection/tests/integration/targets/notification_template/tasks/main.yml
index af43b7d325..89514b3598 100644
--- a/awx_collection/tests/integration/targets/notification_template/tasks/main.yml
+++ b/awx_collection/tests/integration/targets/notification_template/tasks/main.yml
@@ -9,7 +9,7 @@
irc_not: "AWX-Collection-tests-tower_notification_template-irc-not-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
- name: Test deprecation warnings with legacy name
- tower_notification_template:
+ notification_template:
name: "{{ slack_not }}"
organization: Default
notification_type: slack
@@ -54,7 +54,7 @@
- result['deprecations'] | length() == 25
- name: Create Slack notification with custom messages
- tower_notification_template:
+ notification_template:
name: "{{ slack_not }}"
organization: Default
notification_type: slack
@@ -76,7 +76,7 @@
- result is changed
- name: Delete Slack notification
- tower_notification_template:
+ notification_template:
name: "{{ slack_not }}"
organization: Default
state: absent
@@ -87,7 +87,7 @@
- result is changed
- name: Add webhook notification
- tower_notification_template:
+ notification_template:
name: "{{ webhook_not }}"
organization: Default
notification_type: webhook
@@ -102,7 +102,7 @@
- result is changed
- name: Delete webhook notification
- tower_notification_template:
+ notification_template:
name: "{{ webhook_not }}"
organization: Default
state: absent
@@ -113,7 +113,7 @@
- result is changed
- name: Add email notification
- tower_notification_template:
+ notification_template:
name: "{{ email_not }}"
organization: Default
notification_type: email
@@ -134,7 +134,7 @@
- result is changed
- name: Copy email notification
- tower_notification_template:
+ notification_template:
name: "copy_{{ email_not }}"
copy_from: "{{ email_not }}"
organization: Default
@@ -145,7 +145,7 @@
- result.copied
- name: Delete copied email notification
- tower_notification_template:
+ notification_template:
name: "copy_{{ email_not }}"
organization: Default
state: absent
@@ -156,7 +156,7 @@
- result is changed
- name: Delete email notification
- tower_notification_template:
+ notification_template:
name: "{{ email_not }}"
organization: Default
state: absent
@@ -167,7 +167,7 @@
- result is changed
- name: Add twilio notification
- tower_notification_template:
+ notification_template:
name: "{{ twillo_not }}"
organization: Default
notification_type: twilio
@@ -184,7 +184,7 @@
- result is changed
- name: Delete twilio notification
- tower_notification_template:
+ notification_template:
name: "{{ twillo_not }}"
organization: Default
state: absent
@@ -195,7 +195,7 @@
- result is changed
- name: Add PagerDuty notification
- tower_notification_template:
+ notification_template:
name: "{{ pd_not }}"
organization: Default
notification_type: pagerduty
@@ -211,7 +211,7 @@
- result is changed
- name: Delete PagerDuty notification
- tower_notification_template:
+ notification_template:
name: "{{ pd_not }}"
organization: Default
state: absent
@@ -222,7 +222,7 @@
- result is changed
- name: Add IRC notification
- tower_notification_template:
+ notification_template:
name: "{{ irc_not }}"
organization: Default
notification_type: irc
@@ -241,7 +241,7 @@
- result is changed
- name: Delete IRC notification
- tower_notification_template:
+ notification_template:
name: "{{ irc_not }}"
organization: Default
state: absent
diff --git a/awx_collection/tests/integration/targets/organization/tasks/main.yml b/awx_collection/tests/integration/targets/organization/tasks/main.yml
index 8fae9a81d8..5769d7c9b9 100644
--- a/awx_collection/tests/integration/targets/organization/tasks/main.yml
+++ b/awx_collection/tests/integration/targets/organization/tasks/main.yml
@@ -34,7 +34,7 @@
- "result is not changed"
- name: Create an Instance Group
- tower_instance_group:
+ instance_group:
name: "{{ group_name1 }}"
state: present
register: result
@@ -66,7 +66,7 @@
- "result is changed"
- name: Delete the instance groups
- tower_instance_group:
+ instance_group:
name: "{{ group_name1 }}"
state: absent
diff --git a/awx_collection/tests/integration/targets/project/tasks/main.yml b/awx_collection/tests/integration/targets/project/tasks/main.yml
index 04a9e55a62..8a6f36ac24 100644
--- a/awx_collection/tests/integration/targets/project/tasks/main.yml
+++ b/awx_collection/tests/integration/targets/project/tasks/main.yml
@@ -158,7 +158,7 @@
- result is not changed
- name: Create a job template that overrides the project scm_branch
- tower_job_template:
+ job_template:
name: "{{ jt1 }}"
project: "{{ project_name3 }}"
inventory: "Demo Inventory"
@@ -166,7 +166,7 @@
playbook: debug.yml
- name: Launch "{{ jt1 }}"
- tower_job_launch:
+ job_launch:
job_template: "{{ jt1 }}"
register: result
@@ -175,7 +175,7 @@
- result is changed
- name: "wait for job {{ result.id }}"
- tower_job_wait:
+ job_wait:
job_id: "{{ result.id }}"
register: job
@@ -185,7 +185,7 @@
always:
- name: Delete the test job_template
- tower_job_template:
+ job_template:
name: "{{ jt1 }}"
project: "{{ project_name3 }}"
inventory: "Demo Inventory"
diff --git a/awx_collection/tests/integration/targets/project_manual/tasks/create_project_dir.yml b/awx_collection/tests/integration/targets/project_manual/tasks/create_project_dir.yml
index 51beba1203..44c5648fb3 100644
--- a/awx_collection/tests/integration/targets/project_manual/tasks/create_project_dir.yml
+++ b/awx_collection/tests/integration/targets/project_manual/tasks/create_project_dir.yml
@@ -3,7 +3,7 @@
set_fact:
project_base_dir: "{{ tower_settings.project_base_dir }}"
vars:
- tower_settings: "{{ lookup('awx.awx.tower_api', 'config/') }}"
+ tower_settings: "{{ lookup('awx.awx.controller_api', 'config/') }}"
- inventory:
name: localhost
@@ -34,7 +34,7 @@
value: "[{{ project_base_dir }}]"
- name: Create a directory for manual project
- tower_ad_hoc_command:
+ ad_hoc_command:
credential: dummy
inventory: localhost
job_type: run
diff --git a/awx_collection/tests/integration/targets/project_update/tasks/main.yml b/awx_collection/tests/integration/targets/project_update/tasks/main.yml
index 2c9dc194b1..6859b2405a 100644
--- a/awx_collection/tests/integration/targets/project_update/tasks/main.yml
+++ b/awx_collection/tests/integration/targets/project_update/tasks/main.yml
@@ -22,7 +22,7 @@
- project_create_result is changed
- name: Update a project without waiting
- tower_project_update:
+ project_update:
name: "{{ project_name1 }}"
organization: Default
wait: false
@@ -33,7 +33,7 @@
- result is changed
- name: Update a project and wait
- tower_project_update:
+ project_update:
name: "{{ project_name1 }}"
organization: Default
wait: true
@@ -44,7 +44,7 @@
- result is successful
- name: Update a project by ID
- tower_project_update:
+ project_update:
name: "{{ project_create_result.id }}"
organization: Default
wait: true
diff --git a/awx_collection/tests/integration/targets/role/tasks/main.yml b/awx_collection/tests/integration/targets/role/tasks/main.yml
index 03beed9659..e2805a2960 100644
--- a/awx_collection/tests/integration/targets/role/tasks/main.yml
+++ b/awx_collection/tests/integration/targets/role/tasks/main.yml
@@ -40,7 +40,7 @@
- project_info is changed
- name: Create job templates
- tower_job_template:
+ job_template:
name: "{{ item }}"
project: "{{ project_name }}"
inventory: "Demo Inventory"
@@ -86,7 +86,7 @@
- "result is changed"
- name: Create a workflow
- tower_workflow_job_template:
+ workflow_job_template:
name: test-role-workflow
organization: Default
state: present
@@ -139,7 +139,7 @@
register: result
- name: Delete job templates
- tower_job_template:
+ job_template:
name: "{{ item }}"
project: "{{ project_name }}"
inventory: "Demo Inventory"
diff --git a/awx_collection/tests/integration/targets/token/tasks/main.yml b/awx_collection/tests/integration/targets/token/tasks/main.yml
index 739ad9b2a3..9ff781adc3 100644
--- a/awx_collection/tests/integration/targets/token/tasks/main.yml
+++ b/awx_collection/tests/integration/targets/token/tasks/main.yml
@@ -4,7 +4,7 @@
token_description: "AWX-Collection-tests-tower_token-description-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
- name: Try to use a token as a dict which is missing the token parameter
- tower_job_list:
+ job_list:
oauthtoken:
not_token: "This has no token entry"
register: results
@@ -16,7 +16,7 @@
- '"The provided dict in tower_oauthtoken did not properly contain the token entry" == results.msg'
- name: Try to use a token as a list
- tower_job_list:
+ job_list:
oauthtoken:
- dummy_token
register: results
@@ -62,12 +62,12 @@
register: new_token
- name: Validate our token works by token
- tower_job_list:
+ job_list:
tower_oauthtoken: "{{ tower_token.token }}"
register: job_list
- name: Validate out token works by object
- tower_job_list:
+ job_list:
tower_oauthtoken: "{{ tower_token }}"
register: job_list
diff --git a/awx_collection/tests/integration/targets/workflow_job_template/tasks/main.yml b/awx_collection/tests/integration/targets/workflow_job_template/tasks/main.yml
index 5808bdbba4..b0c7311c79 100644
--- a/awx_collection/tests/integration/targets/workflow_job_template/tasks/main.yml
+++ b/awx_collection/tests/integration/targets/workflow_job_template/tasks/main.yml
@@ -37,7 +37,7 @@
- "result is changed"
- name: Add email notification
- tower_notification_template:
+ notification_template:
name: "{{ email_not }}"
organization: Default
notification_type: email
@@ -53,7 +53,7 @@
state: present
- name: Add webhook notification
- tower_notification_template:
+ notification_template:
name: "{{ webhook_not }}"
organization: Default
notification_type: webhook
@@ -92,7 +92,7 @@
name: "{{ project_inv }}"
- name: Create a source inventory
- tower_inventory_source:
+ inventory_source:
name: "{{ project_inv_source }}"
description: Source for Test inventory
inventory: "{{ project_inv }}"
@@ -107,7 +107,7 @@
- "result is changed"
- name: Create a Job Template
- tower_job_template:
+ job_template:
name: "{{ jt1_name }}"
project: "{{ demo_project_name }}"
inventory: Demo Inventory
@@ -121,7 +121,7 @@
- "result is changed"
- name: Create a second Job Template
- tower_job_template:
+ job_template:
name: "{{ jt2_name }}"
project: "{{ demo_project_name }}"
inventory: Demo Inventory
@@ -135,7 +135,7 @@
- "result is changed"
- name: Add a Survey to second Job Template
- tower_job_template:
+ job_template:
name: "{{ jt2_name }}"
organization: Default
project: "{{ demo_project_name }}"
@@ -152,7 +152,7 @@
- "result is changed"
- name: Create a workflow job template
- tower_workflow_job_template:
+ workflow_job_template:
name: "{{ wfjt_name }}"
organization: Default
inventory: Demo Inventory
@@ -168,19 +168,19 @@
# Node actions do what this schema command used to do
# schema: [{"success": [{"job_template": "{{ jt1_name }}"}], "job_template": "{{ jt2_name }}"}]
- name: Create leaf node
- tower_workflow_job_template_node:
+ workflow_job_template_node:
identifier: leaf
unified_job_template: "{{ jt2_name }}"
workflow: "{{ wfjt_name }}"
- name: Create root node
- tower_workflow_job_template_node:
+ workflow_job_template_node:
identifier: root
unified_job_template: "{{ jt1_name }}"
workflow: "{{ wfjt_name }}"
- name: Fail if no name is set for approval
- tower_workflow_job_template_node:
+ workflow_job_template_node:
identifier: approval_test
approval_node:
description: "{{ approval_node_name }}"
@@ -193,7 +193,7 @@
- "no_name_results.msg == 'Approval node name is required to create approval node.'"
- name: Fail if absent and no identifier set
- tower_workflow_job_template_node:
+ workflow_job_template_node:
approval_node:
description: "{{ approval_node_name }}"
workflow: "{{ wfjt_name }}"
@@ -206,7 +206,7 @@
- "no_identifier_results.msg == 'missing required arguments: identifier'"
- name: Fail if present and no unified job template set
- tower_workflow_job_template_node:
+ workflow_job_template_node:
identifier: approval_test
workflow: "{{ wfjt_name }}"
register: no_unified_results
@@ -217,7 +217,7 @@
- "no_unified_results.msg == 'state is present but any of the following are missing: unified_job_template, approval_node, success_nodes, always_nodes, failure_nodes'"
- name: Create approval node
- tower_workflow_job_template_node:
+ workflow_job_template_node:
identifier: approval_test
approval_node:
name: "{{ approval_node_name }}"
@@ -225,7 +225,7 @@
workflow: "{{ wfjt_name }}"
- name: Create link for root node
- tower_workflow_job_template_node:
+ workflow_job_template_node:
identifier: root
workflow: "{{ wfjt_name }}"
success_nodes:
@@ -234,7 +234,7 @@
- leaf
- name: Delete approval node
- tower_workflow_job_template_node:
+ workflow_job_template_node:
identifier: approval_test
approval_node:
name: "{{ approval_node_name }}"
@@ -242,7 +242,7 @@
workflow: "{{ wfjt_name }}"
- name: Add started notifications to workflow job template
- tower_workflow_job_template:
+ workflow_job_template:
name: "{{ wfjt_name }}"
notification_templates_started:
- "{{ email_not }}"
@@ -254,7 +254,7 @@
- "result is changed"
- name: Re Add started notifications to workflow job template
- tower_workflow_job_template:
+ workflow_job_template:
name: "{{ wfjt_name }}"
notification_templates_started:
- "{{ email_not }}"
@@ -266,7 +266,7 @@
- "result is not changed"
- name: Add success notifications to workflow job template
- tower_workflow_job_template:
+ workflow_job_template:
name: "{{ wfjt_name }}"
notification_templates_success:
- "{{ email_not }}"
@@ -278,7 +278,7 @@
- "result is changed"
- name: Copy a workflow job template
- tower_workflow_job_template:
+ workflow_job_template:
name: "copy_{{ wfjt_name }}"
copy_from: "{{ wfjt_name }}"
organization: Default
@@ -289,7 +289,7 @@
- result.copied
- name: Fail Remove "on start" webhook notification from copied workflow job template
- tower_workflow_job_template:
+ workflow_job_template:
name: "copy_{{ wfjt_name }}"
notification_templates_started:
- "{{ email_not }}123"
@@ -303,7 +303,7 @@
- "'returned 0 items' in remove_copied_workflow_node.msg"
- name: Remove "on start" webhook notification from copied workflow job template
- tower_workflow_job_template:
+ workflow_job_template:
name: "copy_{{ wfjt_name }}"
notification_templates_started:
- "{{ email_not }}"
@@ -314,7 +314,7 @@
- "result is changed"
- name: Add Survey to Copied workflow job template
- tower_workflow_job_template:
+ workflow_job_template:
name: "copy_{{ wfjt_name }}"
organization: Default
survey_spec:
@@ -373,7 +373,7 @@
- "result is changed"
- name: Re add survey to workflow job template expected not changed.
- tower_workflow_job_template:
+ workflow_job_template:
name: "copy_{{ wfjt_name }}"
organization: Default
survey_spec:
@@ -432,7 +432,7 @@
- "result is not changed"
- name: Delete copied workflow job template
- tower_workflow_job_template:
+ workflow_job_template:
name: "copy_{{ wfjt_name }}"
state: absent
register: result
@@ -442,7 +442,7 @@
- "result is changed"
- name: Remove "on start" webhook notification from workflow job template
- tower_workflow_job_template:
+ workflow_job_template:
name: "{{ wfjt_name }}"
notification_templates_started:
- "{{ email_not }}"
@@ -453,7 +453,7 @@
- "result is changed"
- name: Delete a workflow job template with an invalid inventory and webook_credential
- tower_workflow_job_template:
+ workflow_job_template:
name: "{{ wfjt_name }}"
inventory: "Does Not Exist"
webhook_credential: "Does Not Exist"
@@ -465,7 +465,7 @@
- "result is changed"
- name: Check module fails with correct msg
- tower_workflow_job_template:
+ workflow_job_template:
name: "{{ wfjt_name }}"
organization: Non_Existing_Organization
register: result
@@ -479,7 +479,7 @@
- "result.total_results == 0"
- name: Create a workflow job template with schema in template
- awx.awx.tower_workflow_job_template:
+ awx.awx.workflow_job_template:
name: "{{ wfjt_name }}"
inventory: Demo Inventory
extra_vars: {'foo': 'bar', 'another-foo': {'barz': 'bar2'}}
@@ -524,7 +524,7 @@
- "result is changed"
- name: Kick off a workflow and wait for it
- tower_workflow_launch:
+ workflow_launch:
workflow_template: "{{ wfjt_name }}"
ignore_errors: true
register: result
@@ -535,7 +535,7 @@
- "'id' in result['job_info']"
- name: Destroy previous schema for one that fails
- awx.awx.tower_workflow_job_template:
+ awx.awx.workflow_job_template:
name: "{{ wfjt_name }}"
destroy_current_schema: true
schema:
@@ -559,7 +559,7 @@
register: result
- name: Kick off a workflow and wait for it
- tower_workflow_launch:
+ workflow_launch:
workflow_template: "{{ wfjt_name }}"
ignore_errors: true
register: result
@@ -569,7 +569,7 @@
- result is failed
- name: Delete a workflow job template
- awx.awx.tower_workflow_job_template:
+ awx.awx.workflow_job_template:
name: "{{ wfjt_name }}"
state: absent
register: result
@@ -579,7 +579,7 @@
- "result is changed"
- name: Delete the Job Template
- tower_job_template:
+ job_template:
name: "{{ jt1_name }}"
project: "{{ demo_project_name }}"
inventory: Demo Inventory
@@ -593,7 +593,7 @@
- "result is changed"
- name: Delete the second Job Template
- tower_job_template:
+ job_template:
name: "{{ jt2_name }}"
project: "{{ demo_project_name }}"
inventory: Demo Inventory
@@ -607,7 +607,7 @@
- "result is changed"
- name: Delete the inventory source
- tower_inventory_source:
+ inventory_source:
name: "{{ project_inv_source }}"
inventory: "{{ project_inv }}"
source: scm
@@ -655,13 +655,13 @@
- "result is changed"
- name: Delete email notification
- tower_notification_template:
+ notification_template:
name: "{{ email_not }}"
organization: Default
state: absent
- name: Delete webhook notification
- tower_notification_template:
+ notification_template:
name: "{{ webhook_not }}"
organization: Default
state: absent
diff --git a/awx_collection/tests/integration/targets/workflow_launch/tasks/main.yml b/awx_collection/tests/integration/targets/workflow_launch/tasks/main.yml
index ba75c7ccf0..7efdaa9332 100644
--- a/awx_collection/tests/integration/targets/workflow_launch/tasks/main.yml
+++ b/awx_collection/tests/integration/targets/workflow_launch/tasks/main.yml
@@ -13,19 +13,19 @@
- block:
- name: Create our workflow
- tower_workflow_job_template:
+ workflow_job_template:
name: "{{ wfjt_name1 }}"
state: present
- name: Add a node
- tower_workflow_job_template_node:
+ workflow_job_template_node:
workflow_job_template: "{{ wfjt_name1 }}"
unified_job_template: "Demo Job Template"
identifier: leaf
register: new_node
- name: Connect to Tower server but request an invalid workflow
- tower_workflow_launch:
+ workflow_launch:
workflow_template: "Does Not Exist"
ignore_errors: true
register: result
@@ -36,7 +36,7 @@
- "'Unable to find workflow job template' in result.msg"
- name: Run the workflow without waiting (this should just give us back a job ID)
- tower_workflow_launch:
+ workflow_launch:
workflow_template: "{{ wfjt_name1 }}"
wait: false
ignore_errors: true
@@ -48,7 +48,7 @@
- "'id' in result['job_info']"
- name: Kick off a workflow and wait for it, but only for a second
- tower_workflow_launch:
+ workflow_launch:
workflow_template: "{{ wfjt_name1 }}"
timeout: 1
ignore_errors: true
@@ -60,7 +60,7 @@
- "'Monitoring of Workflow Job - {{ wfjt_name1 }} aborted due to timeout' in result.msg"
- name: Kick off a workflow and wait for it
- tower_workflow_launch:
+ workflow_launch:
workflow_template: "{{ wfjt_name1 }}"
ignore_errors: true
register: result
@@ -71,7 +71,7 @@
- "'id' in result['job_info']"
- name: Kick off a workflow with extra_vars but not enabled
- tower_workflow_launch:
+ workflow_launch:
workflow_template: "{{ wfjt_name1 }}"
extra_vars:
var1: My First Variable
@@ -85,7 +85,7 @@
- "'The field extra_vars was specified but the workflow job template does not allow for it to be overridden' in result.errors"
- name: Prompt the workflow's with survey
- tower_workflow_job_template:
+ workflow_job_template:
name: "{{ wfjt_name1 }}"
state: present
survey_enabled: true
@@ -118,7 +118,7 @@
new_question: true
- name: Kick off a workflow with survey
- tower_workflow_launch:
+ workflow_launch:
workflow_template: "{{ wfjt_name1 }}"
extra_vars:
basic_name: My First Variable
@@ -131,13 +131,13 @@
- result is not failed
- name: Prompt the workflow's extra_vars on launch
- tower_workflow_job_template:
+ workflow_job_template:
name: "{{ wfjt_name1 }}"
state: present
ask_variables_on_launch: true
- name: Kick off a workflow with extra_vars
- tower_workflow_launch:
+ workflow_launch:
workflow_template: "{{ wfjt_name1 }}"
extra_vars:
basic_name: My First Variable
@@ -151,7 +151,7 @@
- result is not failed
- name: Test waiting for an approval node that doesn't exit on the last workflow for failure.
- tower_workflow_approval:
+ workflow_approval:
workflow_job_id: "{{ result.id }}"
name: Test workflow approval
interval: 1
@@ -166,19 +166,19 @@
- "'Monitoring of Workflow Approval - Test workflow approval aborted due to timeout' in result.msg"
- name: Create new Workflow
- tower_workflow_job_template:
+ workflow_job_template:
name: "{{ wfjt_name2 }}"
state: present
- name: Add a job node
- tower_workflow_job_template_node:
+ workflow_job_template_node:
workflow_job_template: "{{ wfjt_name2 }}"
unified_job_template: "Demo Job Template"
identifier: leaf
# Test tower_workflow_approval and tower_workflow_node_wait
- name: Create approval node
- tower_workflow_job_template_node:
+ workflow_job_template_node:
identifier: approval_test
approval_node:
name: "{{ approval_node_name }}"
@@ -186,21 +186,21 @@
workflow: "{{ wfjt_name2 }}"
- name: Create link for approval node
- tower_workflow_job_template_node:
+ workflow_job_template_node:
identifier: approval_test
workflow: "{{ wfjt_name2 }}"
always_nodes:
- leaf
- name: Run the workflow without waiting This should pause waiting for approval
- tower_workflow_launch:
+ workflow_launch:
workflow_template: "{{ wfjt_name2 }}"
wait: false
ignore_errors: true
register: wfjt_info
- name: Wait for Job node wait to fail as it is waiting on approval
- awx.awx.tower_workflow_node_wait:
+ awx.awx.workflow_node_wait:
workflow_job_id: "{{ wfjt_info.id }}"
name: Demo Job Template
interval: 1
@@ -214,7 +214,7 @@
- "'Monitoring of Workflow Node - Demo Job Template aborted due to timeout' in result.msg"
- name: Wait for approval node to activate and approve
- awx.awx.tower_workflow_approval:
+ awx.awx.workflow_approval:
workflow_job_id: "{{ wfjt_info.id }}"
name: "{{ approval_node_name }}"
interval: 1
@@ -228,14 +228,14 @@
- result is changed
- name: Wait for workflow job to finish max 120s
- tower_job_wait:
+ job_wait:
job_id: "{{ wfjt_info.id }}"
timeout: 120
job_type: "workflow_jobs"
always:
- name: Clean up test workflow
- tower_workflow_job_template:
+ workflow_job_template:
name: "{{ item }}"
state: absent
with_items: