Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced workloads #8844

Merged
merged 2 commits into from
Nov 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
122 changes: 103 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,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
Loading