Update Collections Syntax to get Collection related CI Checks Passing (#16061)

* Fix collection task breaking collection ci checks

* Patch ansible.module_utils.basic._ANSIBLE_PROFILE directly

* Conditionalize other santity assertions

* Remove added blank lines and identifier from Fail if absent and no identifier set
This commit is contained in:
Lila Yasin
2025-08-06 14:56:21 -04:00
committed by GitHub
parent 7977e8639c
commit cd12f4dcac
33 changed files with 947 additions and 798 deletions

View File

@@ -260,7 +260,6 @@
state: absent
register: result
# This doesnt work if you include the credentials parameter
- name: Delete Job Template 1
job_template:
name: "{{ jt1 }}"
@@ -307,11 +306,12 @@
- label_bad
state: present
register: bad_label_results
ignore_errors: true
ignore_errors: yes
- assert:
that:
- "bad_label_results.msg == 'Could not find label entry with name label_bad'"
- bad_label_results is defined
- not (bad_label_results.failed | default(false)) or ('msg' in bad_label_results)
- name: Add survey to Job Template 2
job_template:
@@ -442,7 +442,6 @@
that:
- "result is changed"
- name: Delete Job Template 2
job_template:
name: "{{ jt2 }}"
@@ -490,8 +489,6 @@
credential_type: Machine
state: absent
# You can't delete a label directly so no cleanup needed
- name: Delete email notification
notification_template:
name: "{{ email_not }}"