feat: added tags for multiple roles used by internal.yml playbook
This commit is contained in:
parent
736d90b82d
commit
3ec536f299
3 changed files with 45 additions and 5 deletions
|
@ -38,10 +38,12 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: setup server role
|
- name: setup server role
|
||||||
include_tasks: server.yml
|
ansible.builtin.include_tasks: server.yml
|
||||||
|
tags: [helm, opentofu]
|
||||||
when: k3s_cluster_role is match("server")
|
when: k3s_cluster_role is match("server")
|
||||||
- name: setup agent role
|
- name: setup agent role
|
||||||
include_tasks: agent.yml
|
ansible.builtin.include_tasks: agent.yml
|
||||||
|
tags: [helm, opentofu]
|
||||||
when: k3s_cluster_role is match("agent")
|
when: k3s_cluster_role is match("agent")
|
||||||
|
|
||||||
- name: reset permissions
|
- name: reset permissions
|
||||||
|
|
|
@ -48,9 +48,14 @@
|
||||||
loop: '{{ k3s_cluster_additional_helm_charts }}'
|
loop: '{{ k3s_cluster_additional_helm_charts }}'
|
||||||
loop_control:
|
loop_control:
|
||||||
label: '{{ item.release_name }}'
|
label: '{{ item.release_name }}'
|
||||||
|
tags: [helm]
|
||||||
|
|
||||||
- name: install OpenTofu resources
|
- name: install OpenTofu resources
|
||||||
include_tasks: opentofu.yml
|
ansible.builtin.include_tasks:
|
||||||
|
file: opentofu.yml
|
||||||
|
apply:
|
||||||
|
tags: [opentofu]
|
||||||
loop: '{{ k3s_cluster_additional_tf_resources }}'
|
loop: '{{ k3s_cluster_additional_tf_resources }}'
|
||||||
loop_control:
|
loop_control:
|
||||||
label: '{{ item.name }}'
|
label: '{{ item.name }}'
|
||||||
|
tags: [opentofu]
|
||||||
|
|
|
@ -4,17 +4,23 @@
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
tasks:
|
tasks:
|
||||||
- name: include provisioner role
|
- name: include provisioner role
|
||||||
include_role:
|
ansible.builtin.include_role:
|
||||||
name: nullified.infrastructure.provisioner
|
name: nullified.infrastructure.provisioner
|
||||||
|
apply:
|
||||||
|
tags: [provisioner]
|
||||||
|
tags: [provisioner]
|
||||||
|
|
||||||
- name: load provisioner facts
|
- name: load provisioner facts
|
||||||
hosts: internal
|
hosts: internal
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
tasks:
|
tasks:
|
||||||
- name: include provisioner role
|
- name: include provisioner role
|
||||||
include_role:
|
ansible.builtin.include_role:
|
||||||
name: nullified.infrastructure.provisioner
|
name: nullified.infrastructure.provisioner
|
||||||
tasks_from: load_facts.yml
|
tasks_from: load_facts.yml
|
||||||
|
apply:
|
||||||
|
tags: [always]
|
||||||
|
tags: [always]
|
||||||
|
|
||||||
- name: setup internal infrastructure
|
- name: setup internal infrastructure
|
||||||
hosts: internal
|
hosts: internal
|
||||||
|
@ -23,9 +29,15 @@
|
||||||
- name: include security role
|
- name: include security role
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: nullified.infrastructure.security
|
name: nullified.infrastructure.security
|
||||||
|
apply:
|
||||||
|
tags: [security]
|
||||||
|
tags: [security]
|
||||||
- name: include common role
|
- name: include common role
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: nullified.infrastructure.common
|
name: nullified.infrastructure.common
|
||||||
|
apply:
|
||||||
|
tags: [common]
|
||||||
|
tags: [common]
|
||||||
|
|
||||||
- name: setup servers
|
- name: setup servers
|
||||||
hosts: internal:&server
|
hosts: internal:&server
|
||||||
|
@ -33,6 +45,9 @@
|
||||||
- name: include server role
|
- name: include server role
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: nullified.infrastructure.server
|
name: nullified.infrastructure.server
|
||||||
|
apply:
|
||||||
|
tags: [server]
|
||||||
|
tags: [server]
|
||||||
|
|
||||||
- name: setup vault
|
- name: setup vault
|
||||||
hosts: internal:&vault
|
hosts: internal:&vault
|
||||||
|
@ -40,6 +55,9 @@
|
||||||
- name: include vault role
|
- name: include vault role
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: nullified.infrastructure.vault
|
name: nullified.infrastructure.vault
|
||||||
|
apply:
|
||||||
|
tags: [vault]
|
||||||
|
tags: [vault]
|
||||||
|
|
||||||
- name: setup mariadb servers
|
- name: setup mariadb servers
|
||||||
hosts: internal:&mariadb
|
hosts: internal:&mariadb
|
||||||
|
@ -47,6 +65,9 @@
|
||||||
- name: include mariadb role
|
- name: include mariadb role
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: nullified.infrastructure.mariadb
|
name: nullified.infrastructure.mariadb
|
||||||
|
apply:
|
||||||
|
tags: [mariadb]
|
||||||
|
tags: [mariadb]
|
||||||
|
|
||||||
- name: setup workstations
|
- name: setup workstations
|
||||||
hosts: internal:&workstation
|
hosts: internal:&workstation
|
||||||
|
@ -54,9 +75,15 @@
|
||||||
- name: include workstation role
|
- name: include workstation role
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: nullified.infrastructure.workstation
|
name: nullified.infrastructure.workstation
|
||||||
|
apply:
|
||||||
|
tags: [workstation]
|
||||||
|
tags: [workstation]
|
||||||
- name: include development role
|
- name: include development role
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: nullified.infrastructure.development
|
name: nullified.infrastructure.development
|
||||||
|
apply:
|
||||||
|
tags: [development]
|
||||||
|
tags: [development]
|
||||||
|
|
||||||
- name: setup gaming tools
|
- name: setup gaming tools
|
||||||
hosts: internal:&gaming
|
hosts: internal:&gaming
|
||||||
|
@ -64,6 +91,9 @@
|
||||||
- name: include gaming role
|
- name: include gaming role
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: nullified.infrastructure.gaming
|
name: nullified.infrastructure.gaming
|
||||||
|
apply:
|
||||||
|
tags: [gaming]
|
||||||
|
tags: [gaming]
|
||||||
|
|
||||||
- name: install K3S
|
- name: install K3S
|
||||||
hosts: internal:&k3s
|
hosts: internal:&k3s
|
||||||
|
@ -71,3 +101,6 @@
|
||||||
- name: include k3s role
|
- name: include k3s role
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: nullified.infrastructure.k3s
|
name: nullified.infrastructure.k3s
|
||||||
|
apply:
|
||||||
|
tags: [k3s]
|
||||||
|
tags: [k3s, helm, opentofu]
|
||||||
|
|
Loading…
Add table
Reference in a new issue