diff --git a/ansible/configs/zero-touch-ansible-bu/workloads.yml b/ansible/configs/zero-touch-ansible-bu/workloads.yml index 320d0dca85d..5c0b91a3ff2 100644 --- a/ansible/configs/zero-touch-ansible-bu/workloads.yml +++ b/ansible/configs/zero-touch-ansible-bu/workloads.yml @@ -7,10 +7,10 @@ - name: Deploying {{ _workload_title_ }} workloads on localhost when: _workloads_.localhost | default("") | length > 0 ansible.builtin.include_role: - name: "{{ _pre_localhost }}" + name: "{{ __localhost }}" loop: "{{ _workloads_.localhost }}" loop_control: - loop_var: _pre_localhost + loop_var: __localhost - name: Install {{ _workload_title_ }} workloads on all hosts hosts: all:!windows @@ -19,10 +19,10 @@ - name: Deploying {{ _workload_title_ }} workloads on all hosts when: _workloads_.all | default("") | length > 0 ansible.builtin.include_role: - name: "{{ _pre_all }}" + name: "{{ __all }}" loop: "{{ _workloads_.all }}" loop_control: - loop_var: _pre_all + loop_var: __all - name: Install {{ _workload_title_ }} workloads on bastion hosts: bastions @@ -31,10 +31,10 @@ - name: Deploying {{ _workload_title_ }} workloads on bastion when: _workloads_.bastions | default("") | length > 0 ansible.builtin.include_role: - name: "{{ _pre_bastion }}" + name: "{{ __bastion }}" loop: "{{ _workloads_.bastions }}" loop_control: - loop_var: _pre_bastion + loop_var: __bastion - name: Install {{ _workload_title_ }} workloads for windows hosts: windows @@ -44,10 +44,10 @@ - name: Deploying {{ _workload_title_ }} workloads on windows when: _workloads_.windows | default("") | length > 0 ansible.builtin.include_role: - name: "{{ _pre_windows }}" + name: "{{ __windows }}" loop: "{{ _workloads_.windows }}" loop_control: - loop_var: _pre_windows + loop_var: __windows - name: Install {{ _workload_title_ }} workloads for gitlab hosts: gitlab @@ -56,10 +56,10 @@ - name: Deploying {{ _workload_title_ }} workloads on gitlab when: _workloads_.gitlab | default("") | length > 0 ansible.builtin.include_role: - name: "{{ _pre_gitlab }}" + name: "{{ __gitlab }}" loop: "{{ _workloads_.gitlab }}" loop_control: - loop_var: _pre_gitlab + loop_var: __gitlab - name: Install {{ _workload_title_ }} workloads for nodes hosts: nodes @@ -68,10 +68,10 @@ - name: Deploying {{ _workload_title_ }} workloads on nodes when: _workloads_.nodes | default("") | length > 0 ansible.builtin.include_role: - name: "{{ _pre_nodes }}" + name: "{{ __nodes }}" loop: "{{ _workloads_.nodes }}" loop_control: - loop_var: _pre_nodes + loop_var: __nodes - name: Install {{ _workload_title_ }} workloads for centos nodes hosts: centos_nodes @@ -80,19 +80,103 @@ - name: Deploying {{ _workload_title_ }} workloads on centos nodes when: _workloads_.centos_nodes | default("") | length > 0 ansible.builtin.include_role: - name: "{{ _pre_centos_nodes }}" + name: "{{ __centos_nodes }}" loop: "{{ _workloads_.centos_nodes }}" loop_control: - loop_var: _pre_centos_nodes + loop_var: __centos_nodes -- name: Install {{ _workload_title_ }} workloads for centos nodes +- name: Install {{ _workload_title_ }} workloads for Satelliltes hosts: satellites become: true tasks: - - name: Deploying {{ _workload_title_ }} workloads on centos nodes + - name: Deploying {{ _workload_title_ }} workloads on Satelliltes when: _workloads_.satellites | default("") | length > 0 - ansible.builtin.include_role: - name: "{{ _pre_satellites }}" + include_role: + name: "{{ __satellites }}" loop: "{{ _workloads_.satellites }}" loop_control: - loop_var: _pre_satellites + loop_var: __satellites + +- name: Install {{ _workload_title_ }} workloads for Satelllite Capsules + hosts: capsules + become: true + tasks: + - name: Deploying {{ _workload_title_ }} workloads on Satelllite Capsules + when: _workloads_.capsules | default("") | length > 0 + include_role: + name: "{{ __capsules }}" + loop: "{{ _workloads_.capsules }}" + loop_control: + loop_var: __capsules + +- name: Install {{ _workload_title_ }} workloads for Automation Controller + hosts: controllers + become: true + tasks: + - name: Deploying {{ _workload_title_ }} workloads on Automation Controller + when: _workloads_.controllers | default("") | length > 0 + include_role: + name: "{{ __controllers }}" + loop: "{{ _workloads_.controllers }}" + loop_control: + loop_var: __controllers + +- name: Install {{ _workload_title_ }} workloads for Automation Server + hosts: servers + become: true + tasks: + - name: Deploying {{ _workload_title_ }} workloads on Automation Server + when: _workloads_.servers | default("") | length > 0 + include_role: + name: "{{ __servers }}" + loop: "{{ _workloads_.servers }}" + loop_control: + loop_var: __servers + +- name: Install {{ _workload_title_ }} workloads for rhel7 nodes + hosts: rhel7_nodes + become: true + tasks: + - name: Deploying {{ _workload_title_ }} workloads on rhel7_nodes + when: _workloads_.rhel7_nodes | default("") | length > 0 + ansible.builtin.include_role: + name: "{{ __rhel7_nodes }}" + loop: "{{ _workloads_.rhel7_nodes }}" + loop_control: + loop_var: __rhel7_nodes + +- name: Install {{ _workload_title_ }} workloads for rhel8 nodes + hosts: rhel8_nodes + become: true + tasks: + - name: Deploying {{ _workload_title_ }} workloads on rhel8_nodes + when: _workloads_.rhel8_nodes | default("") | length > 0 + ansible.builtin.include_role: + name: "{{ __rhel8_nodes }}" + loop: "{{ _workloads_.rhel8_nodes }}" + loop_control: + loop_var: __rhel8_nodes + +- name: Install {{ _workload_title_ }} workloads for rhel9 nodes + hosts: rhel9_nodes + become: true + tasks: + - name: Deploying {{ _workload_title_ }} workloads on rhel9_nodes + when: _workloads_.rhel9_nodes | default("") | length > 0 + ansible.builtin.include_role: + name: "{{ __rhel9_nodes }}" + loop: "{{ _workloads_.rhel9_nodes }}" + loop_control: + loop_var: __rhel9_nodes + +- name: Install {{ _workload_title_ }} workloads for rhel10 nodes + hosts: rhel10_nodes + become: true + tasks: + - name: Deploying {{ _workload_title_ }} workloads on rhel10_nodes + when: _workloads_.rhel10_nodes | default("") | length > 0 + ansible.builtin.include_role: + name: "{{ __rhel10_nodes }}" + loop: "{{ _workloads_.rhel10_nodes }}" + loop_control: + loop_var: __rhel10_nodes