mirror of
https://github.com/ansible/awx.git
synced 2026-05-25 01:27:45 -02:30
Updating workflow job template collection test (#12468)
Adding additional use case Fixing error with workflow calling itslef Adding better cleanup of assets created as part of the test
This commit is contained in:
@@ -14,30 +14,38 @@
|
||||
approval_node_name: "AWX-Collection-tests-workflow_approval_node-{{ test_id }}"
|
||||
lab1: "AWX-Collection-tests-job_template-lab1-{{ test_id }}"
|
||||
wfjt_name: "AWX-Collection-tests-workflow_job_template-wfjt-{{ test_id }}"
|
||||
webhook_wfjt_name: "AWX-Collection-tests-workflow_job_template-webhook-wfjt-{{ test_id }}"
|
||||
email_not: "AWX-Collection-tests-job_template-email-not-{{ test_id }}"
|
||||
webhook_not: "AWX-Collection-tests-notification_template-wehbook-not-{{ test_id }}"
|
||||
webhook_notification: "AWX-Collection-tests-notification_template-wehbook-not-{{ test_id }}"
|
||||
project_inv: "AWX-Collection-tests-inventory_source-inv-project-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
|
||||
project_inv_source: "AWX-Collection-tests-inventory_source-inv-source-project-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
|
||||
github_webhook_credential_name: "AWX-Collection-tests-credential-webhook-{{ test_id }}_github"
|
||||
|
||||
- name: "Create a new organization"
|
||||
- block:
|
||||
- name: "Create a new organization"
|
||||
organization:
|
||||
name: "{{ org_name }}"
|
||||
galaxy_credentials:
|
||||
- Ansible Galaxy
|
||||
register: result
|
||||
|
||||
- name: Create an SCM Credential
|
||||
- name: Create Credentials
|
||||
credential:
|
||||
name: "{{ scm_cred_name }}"
|
||||
name: "{{ item.name }}"
|
||||
organization: Default
|
||||
credential_type: Source Control
|
||||
credential_type: "{{ item.type }}"
|
||||
register: result
|
||||
loop:
|
||||
- name: "{{ scm_cred_name }}"
|
||||
type: Source Control
|
||||
- name: "{{ github_webhook_credential_name }}"
|
||||
type: GitHub Personal Access Token
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- "result is changed"
|
||||
|
||||
- name: Add email notification
|
||||
- name: Add email notification
|
||||
notification_template:
|
||||
name: "{{ email_not }}"
|
||||
organization: Default
|
||||
@@ -54,9 +62,9 @@
|
||||
use_ssl: false
|
||||
state: present
|
||||
|
||||
- name: Add webhook notification
|
||||
- name: Add webhook notification
|
||||
notification_template:
|
||||
name: "{{ webhook_not }}"
|
||||
name: "{{ webhook_notification }}"
|
||||
organization: Default
|
||||
notification_type: webhook
|
||||
notification_configuration:
|
||||
@@ -66,7 +74,7 @@
|
||||
state: present
|
||||
register: result
|
||||
|
||||
- name: Create Labels
|
||||
- name: Create Labels
|
||||
label:
|
||||
name: "{{ lab1 }}"
|
||||
organization: "{{ item }}"
|
||||
@@ -74,7 +82,7 @@
|
||||
- Default
|
||||
- "{{ org_name }}"
|
||||
|
||||
- name: Create a Demo Project
|
||||
- name: Create a Demo Project
|
||||
project:
|
||||
name: "{{ demo_project_name }}"
|
||||
organization: Default
|
||||
@@ -84,11 +92,11 @@
|
||||
scm_credential: "{{ scm_cred_name }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- "result is changed"
|
||||
|
||||
- name: Create a 2nd Demo Project in another org
|
||||
- name: Create a 2nd Demo Project in another org
|
||||
project:
|
||||
name: "{{ demo_project_name_2 }}"
|
||||
organization: "{{ org_name }}"
|
||||
@@ -98,17 +106,17 @@
|
||||
scm_credential: "{{ scm_cred_name }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- "result is changed"
|
||||
|
||||
- name: Add an inventory
|
||||
- name: Add an inventory
|
||||
inventory:
|
||||
description: Test inventory
|
||||
organization: Default
|
||||
name: "{{ project_inv }}"
|
||||
|
||||
- name: Create a source inventory
|
||||
- name: Create a source inventory
|
||||
inventory_source:
|
||||
name: "{{ project_inv_source }}"
|
||||
description: Source for Test inventory
|
||||
@@ -119,11 +127,11 @@
|
||||
source: scm
|
||||
register: project_inv_source_result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- "project_inv_source_result is changed"
|
||||
|
||||
- name: Create a Job Template
|
||||
- name: Create a Job Template
|
||||
job_template:
|
||||
name: "{{ jt1_name }}"
|
||||
project: "{{ demo_project_name }}"
|
||||
@@ -133,11 +141,11 @@
|
||||
state: present
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- "result is changed"
|
||||
|
||||
- name: Create a second Job Template
|
||||
- name: Create a second Job Template
|
||||
job_template:
|
||||
name: "{{ jt2_name }}"
|
||||
project: "{{ demo_project_name }}"
|
||||
@@ -147,11 +155,11 @@
|
||||
state: present
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- "result is changed"
|
||||
|
||||
- name: Create a second Job Template in new org
|
||||
- name: Create a second Job Template in new org
|
||||
job_template:
|
||||
name: "{{ jt2_name }}"
|
||||
project: "{{ demo_project_name_2 }}"
|
||||
@@ -161,11 +169,11 @@
|
||||
state: present
|
||||
register: jt2_name_result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- "jt2_name_result is changed"
|
||||
|
||||
- name: Add a Survey to second Job Template
|
||||
- name: Add a Survey to second Job Template
|
||||
job_template:
|
||||
name: "{{ jt2_name }}"
|
||||
organization: Default
|
||||
@@ -178,11 +186,11 @@
|
||||
survey_spec: '{"spec": [{"index": 0, "question_name": "my question?", "default": "mydef", "variable": "myvar", "type": "text", "required": false}], "description": "test", "name": "test"}'
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- "result is changed"
|
||||
|
||||
- name: Create a workflow job template
|
||||
- name: Create a workflow job template
|
||||
workflow_job_template:
|
||||
name: "{{ wfjt_name }}"
|
||||
organization: Default
|
||||
@@ -196,11 +204,11 @@
|
||||
ask_variables_on_launch: true
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- "result is changed"
|
||||
|
||||
- name: Create a workflow job template with bad label
|
||||
- name: Create a workflow job template with bad label
|
||||
workflow_job_template:
|
||||
name: "{{ wfjt_name }}"
|
||||
organization: Default
|
||||
@@ -215,12 +223,12 @@
|
||||
register: bad_label_results
|
||||
ignore_errors: true
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- "bad_label_results.msg == 'Could not find label entry with name label_bad'"
|
||||
|
||||
# Turn off ask_ * settings to test that the issue/10057 has been fixed
|
||||
- name: Turn ask_* settings OFF
|
||||
# Turn off ask_ * settings to test that the issue/10057 has been fixed
|
||||
- name: Turn ask_* settings OFF
|
||||
tower_workflow_job_template:
|
||||
name: "{{ wfjt_name }}"
|
||||
ask_inventory_on_launch: false
|
||||
@@ -229,25 +237,25 @@
|
||||
ask_variables_on_launch: false
|
||||
state: present
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- "result is changed"
|
||||
|
||||
# Node actions do what the schema command used to do
|
||||
- name: Create leaf node
|
||||
# Node actions do what the schema command used to do
|
||||
- name: Create leaf node
|
||||
workflow_job_template_node:
|
||||
identifier: leaf
|
||||
unified_job_template: "{{ jt2_name }}"
|
||||
lookup_organization: "{{ org_name }}"
|
||||
workflow: "{{ wfjt_name }}"
|
||||
|
||||
- name: Create root node
|
||||
- name: Create root node
|
||||
workflow_job_template_node:
|
||||
identifier: root
|
||||
unified_job_template: "{{ jt1_name }}"
|
||||
workflow: "{{ wfjt_name }}"
|
||||
|
||||
- name: Fail if no name is set for approval
|
||||
- name: Fail if no name is set for approval
|
||||
workflow_job_template_node:
|
||||
identifier: approval_test
|
||||
approval_node:
|
||||
@@ -256,11 +264,11 @@
|
||||
register: no_name_results
|
||||
ignore_errors: true
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- "no_name_results.msg == 'Approval node name is required to create approval node.'"
|
||||
|
||||
- name: Fail if absent and no identifier set
|
||||
- name: Fail if absent and no identifier set
|
||||
workflow_job_template_node:
|
||||
approval_node:
|
||||
description: "{{ approval_node_name }}"
|
||||
@@ -269,22 +277,22 @@
|
||||
register: no_identifier_results
|
||||
ignore_errors: true
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- "no_identifier_results.msg == 'missing required arguments: identifier'"
|
||||
|
||||
- name: Fail if present and no unified job template set
|
||||
- name: Fail if present and no unified job template set
|
||||
workflow_job_template_node:
|
||||
identifier: approval_test
|
||||
workflow: "{{ wfjt_name }}"
|
||||
register: no_unified_results
|
||||
ignore_errors: true
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- "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
|
||||
- name: Create approval node
|
||||
workflow_job_template_node:
|
||||
identifier: approval_test
|
||||
approval_node:
|
||||
@@ -292,7 +300,7 @@
|
||||
timeout: 900
|
||||
workflow: "{{ wfjt_name }}"
|
||||
|
||||
- name: Create link for root node
|
||||
- name: Create link for root node
|
||||
workflow_job_template_node:
|
||||
identifier: root
|
||||
workflow: "{{ wfjt_name }}"
|
||||
@@ -301,7 +309,7 @@
|
||||
always_nodes:
|
||||
- leaf
|
||||
|
||||
- name: Delete approval node
|
||||
- name: Delete approval node
|
||||
workflow_job_template_node:
|
||||
identifier: approval_test
|
||||
approval_node:
|
||||
@@ -309,54 +317,54 @@
|
||||
state: absent
|
||||
workflow: "{{ wfjt_name }}"
|
||||
|
||||
- name: Add started notifications to workflow job template
|
||||
- name: Add started notifications to workflow job template
|
||||
workflow_job_template:
|
||||
name: "{{ wfjt_name }}"
|
||||
notification_templates_started:
|
||||
- "{{ email_not }}"
|
||||
- "{{ webhook_not }}"
|
||||
- "{{ webhook_notification }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- "result is changed"
|
||||
|
||||
- name: Re Add started notifications to workflow job template
|
||||
- name: Re Add started notifications to workflow job template
|
||||
workflow_job_template:
|
||||
name: "{{ wfjt_name }}"
|
||||
notification_templates_started:
|
||||
- "{{ email_not }}"
|
||||
- "{{ webhook_not }}"
|
||||
- "{{ webhook_notification }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- "result is not changed"
|
||||
|
||||
- name: Add success notifications to workflow job template
|
||||
- name: Add success notifications to workflow job template
|
||||
workflow_job_template:
|
||||
name: "{{ wfjt_name }}"
|
||||
notification_templates_success:
|
||||
- "{{ email_not }}"
|
||||
- "{{ webhook_not }}"
|
||||
- "{{ webhook_notification }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- "result is changed"
|
||||
|
||||
- name: Copy a workflow job template
|
||||
- name: Copy a workflow job template
|
||||
workflow_job_template:
|
||||
name: "copy_{{ wfjt_name }}"
|
||||
copy_from: "{{ wfjt_name }}"
|
||||
organization: Default
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- result.copied
|
||||
|
||||
- name: Fail Remove "on start" webhook notification from copied workflow job template
|
||||
- name: Fail Remove "on start" webhook notification from copied workflow job template
|
||||
workflow_job_template:
|
||||
name: "copy_{{ wfjt_name }}"
|
||||
notification_templates_started:
|
||||
@@ -364,24 +372,24 @@
|
||||
register: remove_copied_workflow_node
|
||||
ignore_errors: true
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- "remove_copied_workflow_node is failed"
|
||||
- "remove_copied_workflow_node is not changed"
|
||||
- "'returned 0 items' in remove_copied_workflow_node.msg"
|
||||
|
||||
- name: Remove "on start" webhook notification from copied workflow job template
|
||||
- name: Remove "on start" webhook notification from copied workflow job template
|
||||
workflow_job_template:
|
||||
name: "copy_{{ wfjt_name }}"
|
||||
notification_templates_started:
|
||||
- "{{ email_not }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- "result is changed"
|
||||
|
||||
- name: Add Survey to Copied workflow job template
|
||||
- name: Add Survey to Copied workflow job template
|
||||
workflow_job_template:
|
||||
name: "copy_{{ wfjt_name }}"
|
||||
organization: Default
|
||||
@@ -436,11 +444,11 @@
|
||||
new_question: true
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- "result is changed"
|
||||
|
||||
- name: Re add survey to workflow job template expected not changed.
|
||||
- name: Re add survey to workflow job template expected not changed.
|
||||
workflow_job_template:
|
||||
name: "copy_{{ wfjt_name }}"
|
||||
organization: Default
|
||||
@@ -495,32 +503,22 @@
|
||||
new_question: true
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- "result is not changed"
|
||||
|
||||
- name: Delete copied workflow job template
|
||||
workflow_job_template:
|
||||
name: "copy_{{ wfjt_name }}"
|
||||
state: absent
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result is changed"
|
||||
|
||||
- name: Remove "on start" webhook notification from workflow job template
|
||||
- name: Remove "on start" webhook notification from workflow job template
|
||||
workflow_job_template:
|
||||
name: "{{ wfjt_name }}"
|
||||
notification_templates_started:
|
||||
- "{{ email_not }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- "result is changed"
|
||||
|
||||
- name: Delete a workflow job template with an invalid inventory and webook_credential
|
||||
- name: Delete a workflow job template with an invalid inventory and webook_credential
|
||||
workflow_job_template:
|
||||
name: "{{ wfjt_name }}"
|
||||
inventory: "Does Not Exist"
|
||||
@@ -528,25 +526,25 @@
|
||||
state: absent
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- "result is changed"
|
||||
|
||||
- name: Check module fails with correct msg
|
||||
- name: Check module fails with correct msg
|
||||
workflow_job_template:
|
||||
name: "{{ wfjt_name }}"
|
||||
organization: Non_Existing_Organization
|
||||
register: result
|
||||
ignore_errors: true
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- "result is failed"
|
||||
- "result is not changed"
|
||||
- "'Non_Existing_Organization' in result.msg"
|
||||
- "result.total_results == 0"
|
||||
|
||||
- name: Create a workflow job template with workflow nodes in template
|
||||
- name: Create a workflow job template with workflow nodes in template
|
||||
awx.awx.workflow_job_template:
|
||||
name: "{{ wfjt_name }}"
|
||||
inventory: Demo Inventory
|
||||
@@ -591,22 +589,22 @@
|
||||
type: system_job
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- "result is changed"
|
||||
|
||||
- name: Kick off a workflow and wait for it
|
||||
- name: Kick off a workflow and wait for it
|
||||
workflow_launch:
|
||||
workflow_template: "{{ wfjt_name }}"
|
||||
ignore_errors: true
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- result is not failed
|
||||
- "'id' in result['job_info']"
|
||||
|
||||
- name: Destroy previous workflow nodes for one that fails
|
||||
- name: Destroy previous workflow nodes for one that fails
|
||||
awx.awx.workflow_job_template:
|
||||
name: "{{ wfjt_name }}"
|
||||
destroy_current_nodes: true
|
||||
@@ -630,33 +628,72 @@
|
||||
type: inventory_source
|
||||
- identifier: Workflow inception
|
||||
unified_job_template:
|
||||
name: "{{ wfjt_name }}"
|
||||
name: "copy_{{ wfjt_name }}"
|
||||
organization:
|
||||
name: Default
|
||||
type: workflow_job_template
|
||||
register: result
|
||||
|
||||
- name: Kick off a workflow and wait for it
|
||||
- name: Delete copied workflow job template
|
||||
workflow_job_template:
|
||||
name: "copy_{{ wfjt_name }}"
|
||||
state: absent
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result is changed"
|
||||
|
||||
- name: Kick off a workflow and wait for it
|
||||
workflow_launch:
|
||||
workflow_template: "{{ wfjt_name }}"
|
||||
ignore_errors: true
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- result is failed
|
||||
|
||||
- name: Delete a workflow job template
|
||||
awx.awx.workflow_job_template:
|
||||
name: "{{ wfjt_name }}"
|
||||
state: absent
|
||||
- name: Create a workflow job template with a GitLab webhook but a GitHub credential
|
||||
workflow_job_template:
|
||||
name: "{{ webhook_wfjt_name }}"
|
||||
organization: Default
|
||||
inventory: Demo Inventory
|
||||
webhook_service: gitlab
|
||||
webhook_credential: "{{ github_webhook_credential_name }}"
|
||||
ignore_errors: true
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- "result is changed"
|
||||
- result is failed
|
||||
- "'Must match the selected webhook service' in result['msg']"
|
||||
|
||||
- name: Delete the Job Template
|
||||
- name: Create a workflow job template with a GitHub webhook and a GitHub credential
|
||||
workflow_job_template:
|
||||
name: "{{ webhook_wfjt_name }}"
|
||||
organization: Default
|
||||
inventory: Demo Inventory
|
||||
webhook_service: github
|
||||
webhook_credential: "{{ github_webhook_credential_name }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is not failed
|
||||
|
||||
always:
|
||||
- name: Delete the workflow job template
|
||||
awx.awx.workflow_job_template:
|
||||
name: "{{ item }}"
|
||||
state: absent
|
||||
ignore_errors: True
|
||||
loop:
|
||||
- "copy_{{ wfjt_name }}"
|
||||
- "{{ wfjt_name }}"
|
||||
- "{{ webhook_wfjt_name }}"
|
||||
|
||||
- name: Delete the Job Template
|
||||
job_template:
|
||||
name: "{{ jt1_name }}"
|
||||
project: "{{ demo_project_name }}"
|
||||
@@ -664,13 +701,9 @@
|
||||
playbook: hello_world.yml
|
||||
job_type: run
|
||||
state: absent
|
||||
register: result
|
||||
ignore_errors: True
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result is changed"
|
||||
|
||||
- name: Delete the second Job Template
|
||||
- name: Delete the second Job Template
|
||||
job_template:
|
||||
name: "{{ jt2_name }}"
|
||||
project: "{{ demo_project_name }}"
|
||||
@@ -679,13 +712,9 @@
|
||||
playbook: hello_world.yml
|
||||
job_type: run
|
||||
state: absent
|
||||
register: result
|
||||
ignore_errors: True
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result is changed"
|
||||
|
||||
- name: Delete the second Job Template
|
||||
- name: Delete the second Job Template
|
||||
job_template:
|
||||
name: "{{ jt2_name }}"
|
||||
project: "{{ demo_project_name_2 }}"
|
||||
@@ -694,35 +723,25 @@
|
||||
playbook: hello_world.yml
|
||||
job_type: run
|
||||
state: absent
|
||||
register: result
|
||||
ignore_errors: True
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result is changed"
|
||||
|
||||
- name: Delete the inventory source
|
||||
- name: Delete the inventory source
|
||||
inventory_source:
|
||||
name: "{{ project_inv_source }}"
|
||||
inventory: "{{ project_inv }}"
|
||||
source: scm
|
||||
state: absent
|
||||
ignore_errors: True
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result is changed"
|
||||
|
||||
- name: Delete the inventory
|
||||
- name: Delete the inventory
|
||||
inventory:
|
||||
description: Test inventory
|
||||
organization: Default
|
||||
name: "{{ project_inv }}"
|
||||
state: absent
|
||||
ignore_errors: True
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result is changed"
|
||||
|
||||
- name: Delete the Demo Project
|
||||
- name: Delete the Demo Project
|
||||
project:
|
||||
name: "{{ demo_project_name }}"
|
||||
organization: Default
|
||||
@@ -730,9 +749,9 @@
|
||||
scm_url: https://github.com/ansible/ansible-tower-samples.git
|
||||
scm_credential: "{{ scm_cred_name }}"
|
||||
state: absent
|
||||
register: result
|
||||
ignore_errors: True
|
||||
|
||||
- name: Delete the 2nd Demo Project
|
||||
- name: Delete the 2nd Demo Project
|
||||
project:
|
||||
name: "{{ demo_project_name_2 }}"
|
||||
organization: "{{ org_name }}"
|
||||
@@ -740,38 +759,40 @@
|
||||
scm_url: https://github.com/ansible/ansible-tower-samples.git
|
||||
scm_credential: "{{ scm_cred_name }}"
|
||||
state: absent
|
||||
register: result
|
||||
ignore_errors: True
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result is changed"
|
||||
|
||||
- name: Delete the SCM Credential
|
||||
- name: Delete the SCM Credential
|
||||
credential:
|
||||
name: "{{ scm_cred_name }}"
|
||||
organization: Default
|
||||
credential_type: Source Control
|
||||
state: absent
|
||||
register: result
|
||||
ignore_errors: True
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result is changed"
|
||||
- name: Delete the GitHub Webhook Credential
|
||||
credential:
|
||||
name: "{{ github_webhook_credential_name }}"
|
||||
organization: Default
|
||||
credential_type: GitHub Personal Access Token
|
||||
state: absent
|
||||
ignore_errors: True
|
||||
|
||||
- name: Delete email notification
|
||||
- name: Delete email notification
|
||||
notification_template:
|
||||
name: "{{ email_not }}"
|
||||
organization: Default
|
||||
state: absent
|
||||
ignore_errors: True
|
||||
|
||||
- name: Delete webhook notification
|
||||
- name: Delete webhook notification
|
||||
notification_template:
|
||||
name: "{{ webhook_not }}"
|
||||
name: "{{ webhook_notification }}"
|
||||
organization: Default
|
||||
state: absent
|
||||
ignore_errors: True
|
||||
|
||||
- name: "Remove the organization"
|
||||
- name: "Remove the organization"
|
||||
organization:
|
||||
name: "{{ org_name }}"
|
||||
state: absent
|
||||
register: result
|
||||
ignore_errors: True
|
||||
|
||||
Reference in New Issue
Block a user