Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
miteshget committed Nov 21, 2024
1 parent e920b98 commit 6c44c85
Showing 1 changed file with 43 additions and 19 deletions.
62 changes: 43 additions & 19 deletions ansible/configs/zero-touch-ansible-bu/workloads.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -80,19 +80,43 @@
- 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

0 comments on commit 6c44c85

Please sign in to comment.