123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755 |
- # Copyright 2021 Dell Inc. or its subsidiaries. All Rights Reserved.
- #
- # Licensed under the Apache License, Version 2.0 (the "License");
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- ---
- # Test case to verify the prerequisites are installed and execute the AWX deployment
- - name: OMNIA_1.1_AWX_TC_001
- hosts: localhost
- connection: local
- vars_files:
- - test_vars/test_inventory_vars.yml
- tasks:
-
- - name: Check login_vars file is encrypted
- command: cat "{{ login_vars_path }}"
- changed_when: false
- register: config_content
- tags: always
-
- - name: Decrpyt login_vars.yml
- command: >-
- ansible-vault decrypt {{ login_vars_path }}
- --vault-password-file {{ login_vars_vault_path }}
- changed_when: false
- when: "'$ANSIBLE_VAULT;' in config_content.stdout"
- tags: always
- - name: Include variable file login_vars.yml
- include_vars: "{{ login_vars_path }}"
- tags: always
-
- - name: Encypt login file
- command: >-
- ansible-vault encrypt {{ login_vars_path }}
- --vault-password-file {{ login_vars_vault_path }}
- changed_when: false
- tags: always
-
- - name: Execute awx command
- command: "kubectl get pods -n {{ awx_namespace }}"
- changed_when: true
- register: k8s_pods
- run_once: true
- ignore_errors: true
- tags: TC_001,VERIFY_OMNIA_01
-
- - name: Validate awx operator containers
- assert:
- that:
- - k8s_pods.stdout | regex_search("{{ item }}")
- fail_msg: "{{ awx_fail_msg }}"
- success_msg: "{{ awx_success_msg }}"
- loop:
- - "awx-([A-Za-z0-9]{10})-([A-Za-z0-9]{5})"
- - "awx-operator-([A-Za-z0-9]{10})-([A-Za-z0-9]{5})"
- - "awx-postgres-([A-Za-z0-9]{1})"
- run_once: true
- tags: TC_001,VERIFY_OMNIA_01
-
- # Test case to verify inventory groups are present in AWX UI (idrac, ethernet, inifiniband, rbod)
- - name: OMNIA_1.1_AWX_TC_003
- hosts: localhost
- connection: local
-
- vars_files:
- - test_vars/test_inventory_vars.yml
- tasks:
- - name: Execute get pods command
- command: "kubectl get pods -n {{ awx_namespace }}"
- changed_when: true
- register: k8s_pods
- run_once: true
- ignore_errors: true
- tags: TC_003
-
- - name: Get awx pod
- set_fact:
- awx_pods: "{{ item | regex_search(awx_pod_regex) | trim }}"
- idrac_status: true
- with_items:
- - "{{ k8s_pods.stdout_lines }}"
- run_once: true
- when: item | regex_search(awx_pod_item_regex)
- tags: TC_003
- - name: Get awx cluster ip
- shell: "kubectl get svc awx-ui -n {{ awx_namespace }} -o jsonpath='{.spec.clusterIP}'"
- register: awx_cluster_ip
- changed_when: false
- ignore_errors: true
- tags: TC_003
- - name: Get AWX admin password
- shell: "kubectl get secret awx-admin-password -n {{ awx_namespace }} -o jsonpath='{.data.password}' | base64 --decode"
- register: awx_admin_password
- changed_when: false
- ignore_errors: true
- tags: TC_003
-
- - name: Execute awx get inventory hosts command
- command: "awx --conf.host http://{{ awx_cluster_ip.stdout }}:8052 --conf.username admin --conf.password {{ awx_admin_password.stdout }} --conf.insecure hosts list --inventory {{ item }} -f human --filter 'name'"
- register: idrac_hosts
- with_items:
- - "idrac_inventory"
- - "infiniband_inventory"
- - "ethernet_inventory"
- - "powervault_me4_inventory"
- run_once: true
- changed_when: false
- tags: TC_003
-
- - name: Verify inventory are present in AWX UI
- assert:
- that:
- - item.stdout_lines[0] | regex_search("name")
- fail_msg: "{{ item.item }} - {{ inventory_fail_msg }}"
- success_msg: "{{ item.item }} - {{ inventory_success_msg }}"
- with_items:
- - "{{ idrac_hosts.results }}"
- changed_when: false
- tags: TC_003
-
- # Test case to validate ip of idrac
- - name: OMNIA_1.1_AWX_TC_004
- hosts: localhost
- connection: local
-
- vars_files:
- - test_vars/test_inventory_vars.yml
- - ../input_params/base_vars.yml
- tasks:
-
- - name: Execute get pods command
- command: "kubectl get pods -n {{ awx_namespace }}"
- changed_when: true
- register: k8s_pods
- run_once: true
- ignore_errors: true
- tags: TC_004
-
- - name: Get awx pod
- set_fact:
- awx_pods: "{{ item | regex_search(awx_pod_regex) | trim }}"
- with_items:
- - "{{ k8s_pods.stdout_lines }}"
- run_once: true
- when: item | regex_search(awx_pod_item_regex)
- changed_when: false
- tags: TC_004
- - name: Get awx cluster ip
- shell: "kubectl get svc awx-ui -n {{ awx_namespace }} -o jsonpath='{.spec.clusterIP}'"
- register: awx_cluster_ip
- changed_when: false
- tags: TC_004
- - name: Get AWX admin password
- shell: "kubectl get secret awx-admin-password -n {{ awx_namespace }} -o jsonpath='{.data.password}' | base64 --decode"
- register: awx_admin_password
- changed_when: false
- ignore_errors: true
- tags: TC_004
-
- - name: Execute awx get inventory hosts command
- command: "awx --conf.host http://{{ awx_cluster_ip.stdout }}:8052 --conf.username admin --conf.password {{ awx_admin_password.stdout }} --conf.insecure hosts list --inventory {{ idrac_inventory_name }} -f human --filter 'name'"
- changed_when: true
- register: idrac_hosts
- run_once: true
- tags: TC_004
-
- - name: List of iDRAC host
- include_tasks: "{{ validation_script_path }}"
- with_items:
- - "{{ idrac_hosts.stdout_lines[2:] }}"
- when: idrac_hosts.stdout_lines | length > 2
- ignore_errors: true
- tags: TC_004
-
- - name: Empty iDRAC hosts
- debug:
- msg: "{{ empty_host_err }}"
- when: idrac_hosts.stdout_lines | length < 3
- failed_when: false
- tags: TC_004
- # Test case to validate ip of infiniband
- - name: OMNIA_1.1_AWX_TC_005
- hosts: localhost
- connection: local
-
- vars_files:
- - test_vars/test_inventory_vars.yml
- - ../input_params/base_vars.yml
- tasks:
- - name: Execute get pods command
- command: "kubectl get pods -n {{ awx_namespace }}"
- changed_when: true
- register: k8s_pods
- run_once: true
- ignore_errors: true
- tags: TC_005
-
- - name: Get awx pod
- set_fact:
- awx_pods: "{{ item | regex_search(awx_pod_regex) | trim }}"
- with_items:
- - "{{ k8s_pods.stdout_lines }}"
- run_once: true
- when: item | regex_search(awx_pod_item_regex)
- failed_when: false
- tags: TC_005
- - name: Get awx cluster ip
- shell: "kubectl get svc awx-ui -n {{ awx_namespace }} -o jsonpath='{.spec.clusterIP}'"
- register: awx_cluster_ip
- changed_when: false
- tags: TC_005
- - name: Get AWX admin password
- shell: "kubectl get secret awx-admin-password -n {{ awx_namespace }} -o jsonpath='{.data.password}' | base64 --decode"
- register: awx_admin_password
- changed_when: false
- ignore_errors: true
- tags: TC_005
-
- - name: Execute awx get inventory hosts command
- command: "awx --conf.host http://{{ awx_cluster_ip.stdout }}:8052 --conf.username admin --conf.password {{ awx_admin_password.stdout }} --conf.insecure hosts list --inventory {{ ib_inventory_name }} -f human --filter 'name'"
- changed_when: true
- register: infiniband_hosts
- run_once: true
- ignore_errors: true
- tags: TC_005
-
- - name: List of infiniband hosts
- include_tasks: "{{ validation_script_path }}"
- with_items:
- - "{{ infiniband_hosts.stdout_lines[2:] }}"
- when: infiniband_hosts.stdout_lines | length > 2
- ignore_errors: true
- tags: TC_005
-
- - name: Empty infiniband hosts
- debug:
- msg: "{{ empty_host_err }}"
- when: infiniband_hosts.stdout_lines | length < 3
- failed_when: false
- tags: TC_005
- # Test case to validate ip of ethernet
- - name: OMNIA_1.1_AWX_TC_006
- hosts: localhost
- connection: local
-
- vars_files:
- - test_vars/test_inventory_vars.yml
- - ../input_params/base_vars.yml
- tasks:
- - name: Execute get pods command
- command: "kubectl get pods -n {{ awx_namespace }}"
- changed_when: true
- register: k8s_pods
- run_once: true
- ignore_errors: true
- tags: TC_006
-
- - name: Get awx pod
- set_fact:
- awx_pods: "{{ item | regex_search(awx_pod_regex) | trim }}"
- with_items:
- - "{{ k8s_pods.stdout_lines }}"
- run_once: true
- when: item | regex_search(awx_pod_item_regex)
- failed_when: false
- tags: TC_006
- - name: Get awx cluster ip
- shell: "kubectl get svc awx-ui -n {{ awx_namespace }} -o jsonpath='{.spec.clusterIP}'"
- register: awx_cluster_ip
- changed_when: false
- tags: TC_006
- - name: Get AWX admin password
- shell: "kubectl get secret awx-admin-password -n {{ awx_namespace }} -o jsonpath='{.data.password}' | base64 --decode"
- register: awx_admin_password
- changed_when: false
- ignore_errors: true
- tags: TC_006
-
- - name: Execute awx get inventory hosts command
- command: "awx --conf.host http://{{ awx_cluster_ip.stdout }}:8052 --conf.username admin --conf.password {{ awx_admin_password.stdout }} --conf.insecure hosts list --inventory {{ ethernet_inventory_name }} -f human --filter 'name'"
- changed_when: true
- register: ethernet_hosts
- run_once: true
- ignore_errors: true
- tags: TC_006
-
- - name: List of ethernet hosts
- include_tasks: "{{ validation_script_path }}"
- with_items:
- - "{{ ethernet_hosts.stdout_lines[2:] }}"
- when: ethernet_hosts.stdout_lines | length > 2
- ignore_errors: true
- tags: TC_006
-
- - name: Empty ethernet hosts
- debug:
- msg: "{{ empty_host_err }}"
- when: ethernet_hosts.stdout_lines | length < 3
- failed_when: false
- tags: TC_006
-
- # Test case to validate ip of powervault
- - name: OMNIA_1.1_AWX_TC_007
- hosts: localhost
- connection: local
-
- vars_files:
- - test_vars/test_inventory_vars.yml
- - ../input_params/base_vars.yml
- tasks:
- - name: Execute get pods command
- command: "kubectl get pods -n {{ awx_namespace }}"
- changed_when: true
- register: k8s_pods
- run_once: true
- ignore_errors: true
- tags: TC_007
-
- - name: Get awx pod
- set_fact:
- awx_pods: "{{ item | regex_search(awx_pod_regex) | trim }}"
- idrac_status: true
- with_items:
- - "{{ k8s_pods.stdout_lines }}"
- run_once: true
- when: item | regex_search(awx_pod_item_regex)
- failed_when: false
- tags: TC_007
- - name: Get awx cluster ip
- shell: "kubectl get svc awx-ui -n {{ awx_namespace }} -o jsonpath='{.spec.clusterIP}'"
- register: awx_cluster_ip
- changed_when: false
- tags: TC_007
- - name: Get AWX admin password
- shell: "kubectl get secret awx-admin-password -n {{ awx_namespace }} -o jsonpath='{.data.password}' | base64 --decode"
- register: awx_admin_password
- changed_when: false
- ignore_errors: true
- tags: TC_007
-
- - name: Execute awx get inventory hosts command
- command: "awx --conf.host http://{{ awx_cluster_ip.stdout }}:8052 --conf.username admin --conf.password {{ awx_admin_password.stdout }} --conf.insecure hosts list --inventory {{ pv_inventory_name }} -f human --filter 'name'"
- changed_when: true
- register: powervault_hosts
- run_once: true
- ignore_errors: true
- tags: TC_007
-
- - name: List of powervault hosts
- include_tasks: "{{ validation_script_path }}"
- with_items:
- - "{{ powervault_hosts.stdout_lines[2:] }}"
- when: powervault_hosts.stdout_lines | length > 2
- ignore_errors: true
- tags: TC_007
-
- - name: Empty powervault hosts
- debug:
- msg: "{{ empty_host_err }}"
- when: powervault_hosts.stdout_lines | length < 3
- failed_when: false
- tags: TC_007
- # Test case to verify omnia inventory groups (manager, compute, login, nfs)
- - name: OMNIA_1.1_AWX_TC_008
- hosts: localhost
- connection: local
- vars_files:
- - test_vars/test_inventory_vars.yml
- - ../roles/webui_awx/vars/main.yml
-
- tasks:
- - name: Get awx-service Cluster-IP
- command: "kubectl get svc awx-service -n {{ awx_namespace }} -o jsonpath='{.spec.clusterIP}'"
- register: awx_cluster_ip
- changed_when: false
- run_once: true
- ignore_errors: true
- tags: TC_008
-
- - name: Get AWX admin password
- shell: "kubectl get secret awx-admin-password -n {{ awx_namespace }} -o jsonpath='{.data.password}' | base64 --decode"
- register: awx_admin_password
- changed_when: false
- run_once: true
- ignore_errors: true
- tags: TC_008
-
- - name: Set IP and password
- set_fact:
- awx_ip: 'http://{{ awx_cluster_ip.stdout }}'
- admin_password: "{{ awx_admin_password.stdout }}"
- run_once: true
- failed_when: false
- tags: TC_008
-
- - name: Get omnia inventory groups
- awx.awx.tower_group:
- name: "{{ item.name }}"
- description: "{{ item.description }}"
- inventory: "node_inventory"
- state: present
- loop: "{{ group_names }}"
- register: awx_group
- run_once: true
- ignore_errors: true
- tags: TC_008
-
- - name: Verify omnia inventory groups
- assert:
- that:
- - item.changed == false
- - item.item.name == "{{ manager_group }}" or
- item.item.name =="{{ compute_group }}" or
- item.item.name == "{{ login_group }}" or
- item.item.name == "{{ nfs_group }}"
- fail_msg: "{{ item .item.name }}{{ group_fail_msg }}"
- success_msg: "{{ item .item.name }}{{ group_success_msg }}"
- with_items:
- - "{{ awx_group.results }}"
- failed_when: false
- tags: TC_008
-
- # Test case to verify AWX configuration is done properly with job_templates, schedules in place
- - name: OMNIA_1.1_AWX_TC_009
- hosts: localhost
- connection: local
- vars_files:
- - test_vars/test_inventory_vars.yml
- - ../roles/webui_awx/vars/main.yml
-
- tasks:
- - name: Get awx-service Cluster-IP
- command: "kubectl get svc awx-service -n {{ awx_namespace }} -o jsonpath='{.spec.clusterIP}'"
- register: awx_cluster_ip
- changed_when: false
- ignore_errors: true
- run_once: true
- tags: TC_009
-
- - name: Get AWX admin password
- shell: "kubectl get secret awx-admin-password -n {{ awx_namespace }} -o jsonpath='{.data.password}' | base64 --decode"
- register: awx_admin_password
- changed_when: false
- ignore_errors: true
- run_once: true
- tags: TC_009
-
- - name: Set IP and password
- set_fact:
- awx_ip: 'http://{{ awx_cluster_ip.stdout }}'
- admin_password: "{{ awx_admin_password.stdout }}"
- failed_when: false
- run_once: true
- tags: TC_009
-
- - name: Get job template details
- awx.awx.tower_job_template:
- name: "{{ item.name }}"
- job_type: "run"
- organization: "{{ organization_name }}"
- inventory: "{{ item.inventory }}"
- project: "{{ project_name }}"
- playbook: "{{ item.playbook }}"
- credentials:
- - "{{ item.credential }}"
- state: present
- tower_config_file: "{{ tower_config_file_path }}"
- loop: "{{ job_template_details }}"
- register: job_template
- when: item.flag
- ignore_errors: true
- tags: TC_009
- - name: Validate job template
- assert:
- that:
- - item.changed == false
- fail_msg: "{{ item.item.name }}{{ job_template_fail_msg }}"
- success_msg: " {{ item.item.name }} {{ job_template_success_msg }}"
- with_items:
- - "{{ job_template.results }}"
- failed_when: false
- when: item.item.flag
- tags: TC_009
-
- - name: Build a schedule for job template
- awx.awx.tower_schedule:
- name: "{{ item.name }}"
- unified_job_template: "{{ item.template }}"
- rrule: "{{ schedule_rule }}"
- state: present
- tower_config_file: "{{ tower_config_file_path }}"
- register: schedule
- loop: "{{ scheduled_templates }}"
- failed_when: false
- run_once: true
- tags: TC_009
-
- - name: Validate schedule status
- assert:
- that:
- - schedule.changed == false
- fail_msg: "{{ schedule_fail_msg }}"
- success_msg: "{{ schedule_success_msg }}"
- failed_when: false
- tags: TC_009
- # Test case to verify updation of new node in omnia inventory
- - name: OMNIA_1.1_AWX_TC_010
- hosts: localhost
- connection: local
-
- vars_files:
- - test_vars/test_inventory_vars.yml
- - ../input_params/base_vars.yml
- tasks:
- - name: Execute get pods command
- command: "kubectl get pods -n {{ awx_namespace }}"
- changed_when: true
- register: k8s_pods
- run_once: true
- ignore_errors: true
- tags: TC_010
-
- - name: Get awx pod
- set_fact:
- awx_pods: "{{ item | regex_search(awx_pod_regex) | trim }}"
- with_items:
- - "{{ k8s_pods.stdout_lines }}"
- run_once: true
- when: item | regex_search(awx_pod_item_regex)
- failed_when: false
- tags: TC_010
- - name: Get AWX admin password
- shell: "kubectl get secret awx-admin-password -n {{ awx_namespace }} -o jsonpath='{.data.password}' | base64 --decode"
- register: awx_admin_password
- changed_when: false
- ignore_errors: true
- tags: TC_010
-
- - name: Execute awx get inventory hosts command
- command: "awx --conf.host {{ awx_host }} --conf.username admin --conf.password {{ awx_admin_password.stdout }} --conf.insecure hosts list --inventory {{ node_inventory_name }} -f human --filter 'name'"
- changed_when: true
- register: node_hosts
- run_once: true
- failed_when: false
- tags: TC_010
-
- - name: Get node_inventory hosts
- command: ping -c1 {{ item }}
- delegate_to: localhost
- register: ping_result
- ignore_errors: yes
- changed_when: false
- with_items:
- - "{{ node_hosts.stdout_lines[2:] }}"
- when: node_hosts.stdout_lines | length > 2
- tags: TC_010
-
- - name: Verify updation of new node
- assert:
- that:
- - "'100% packet loss' not in item.stdout"
- fail_msg: "{{ node_fail_msg }}"
- success_msg: "{{ node_success_msg }}"
- with_items:
- - "{{ ping_result.results }}"
- when: node_hosts.stdout_lines | length > 2
- failed_when: false
- tags: TC_010
- - name: Empty node hosts
- debug:
- msg: "{{ empty_host_err }}"
- when: node_hosts.stdout_lines | length < 3
- tags: TC_010
-
- # Test case to verify AWX configuration is done properly with all items in place
- - name: OMNIA_1.1_AWX_TC_011
- hosts: localhost
- connection: local
- vars_files:
- - test_vars/test_inventory_vars.yml
- - ../roles/webui_awx/vars/main.yml
-
- tasks:
- - name: Get awx-service Cluster-IP
- command: "kubectl get svc awx-service -n {{ awx_namespace }} -o jsonpath='{.spec.clusterIP}'"
- register: awx_cluster_ip
- changed_when: false
- ignore_errors: true
- run_once: true
- tags: TC_011
-
- - name: Get AWX admin password
- shell: "kubectl get secret awx-admin-password -n {{ awx_namespace }} -o jsonpath='{.data.password}' | base64 --decode"
- register: awx_admin_password
- changed_when: false
- ignore_errors: true
- run_once: true
- tags: TC_011
-
- - name: Set IP and password
- set_fact:
- awx_ip: 'http://{{ awx_cluster_ip.stdout }}'
- admin_password: "{{ awx_admin_password.stdout }}"
- run_once: true
- tags: TC_011
- - name: Get organization details
- awx.awx.tower_organization:
- name: "{{ organization_name }}"
- description: "{{ org_description }}"
- state: present
- register: organization
- ignore_errors: true
- run_once: true
- tags: TC_011
-
- - name: Validate an organization
- assert:
- that:
- - organization.changed == false
- fail_msg: "{{ organization_fail_msg }}"
- success_msg: "{{ organization_success_msg }}"
- failed_when: false
- tags: TC_011
-
- - name: Get tower inventory details
- awx.awx.tower_inventory:
- name: "{{ item.name }}"
- description: "{{ item.description }}"
- organization: "{{ organization_name }}"
- state: present
- loop: "{{ inventory_names }}"
- register: inventory
- when: item.flag
- ignore_errors: true
- run_once: true
- tags: TC_011
- - name: Validate inventory status
- assert:
- that:
- - item.changed == false
- fail_msg: "{{ inventory_fail_msg }}"
- success_msg: "{{ inventory_success_msg }}"
- with_items:
- - "{{ inventory.results }}"
- failed_when: false
- tags: TC_011
-
- - name: Get job template details
- awx.awx.tower_job_template:
- name: "{{ item.name }}"
- job_type: "run"
- organization: "{{ organization_name }}"
- inventory: "{{ item.inventory }}"
- project: "{{ project_name }}"
- playbook: "{{ item.playbook }}"
- credentials:
- - "{{ item.credential }}"
- state: present
- loop: "{{ job_template_details }}"
- register: job_template
- when: item.flag
- ignore_errors: true
- run_once: true
- tags: TC_011
- - name: Validate job template
- assert:
- that:
- - item.changed == false
- fail_msg: "{{ item.item.name }} {{ job_template_fail_msg }}"
- success_msg: "{{ item.item.name }} {{ job_template_success_msg }}"
- with_items:
- - "{{ job_template.results }}"
- failed_when: false
- when: item.item.flag
- tags: TC_011
-
- - name: Get project details
- awx.awx.tower_project:
- name: "{{ project_name }}"
- description: "{{ project_description }}"
- organization: "{{ organization_name }}"
- state: present
- register: project
- ignore_errors: true
- run_once: true
- tags: TC_011
-
- - name: Verify project
- assert:
- that:
- - project.changed == false
- fail_msg: "{{ project_fail_msg }}"
- success_msg: "{{ project_success_msg }}"
- failed_when: false
- tags: TC_011
-
- - name: Build a schedule for job template
- awx.awx.tower_schedule:
- name: "{{ item.name }}"
- unified_job_template: "{{ item.template }}"
- rrule: "{{ schedule_rule }}"
- state: present
- register: schedule
- loop: "{{ scheduled_templates }}"
- failed_when: false
- run_once: true
- tags: TC_011
-
- - name: Validate schedule status
- assert:
- that:
- - schedule.changed == false
- fail_msg: "{{ schedule_fail_msg }}"
- success_msg: "{{ schedule_success_msg }}"
- failed_when: false
- tags: TC_011
|