From 023ff35ac629b63c97a9482b5dabba4909de66a2 Mon Sep 17 00:00:00 2001 From: Tunui Franken Date: Fri, 31 Jan 2025 19:04:44 +0100 Subject: [PATCH] Add master playbook to install everything in order --- playbooks/all.yml | 22 ++++++++++++++++++++++ playbooks/icinga2.yml | 5 ----- playbooks/lime2.yml | 4 ++-- roles/icinga2_agent/meta/main.yml | 4 ++++ roles/icinga2_master/meta/main.yml | 4 ++++ 5 files changed, 32 insertions(+), 7 deletions(-) create mode 100644 playbooks/all.yml create mode 100644 roles/icinga2_agent/meta/main.yml create mode 100644 roles/icinga2_master/meta/main.yml diff --git a/playbooks/all.yml b/playbooks/all.yml new file mode 100644 index 0000000..3edbb8b --- /dev/null +++ b/playbooks/all.yml @@ -0,0 +1,22 @@ +--- + +# Set up everything +# Usage: ansible-playbook playbooks/all.yml -l (testservers|prodservers) [-e forgejo_dump_path=/path/to/forgejo/dump] + +- name: Set up common things + gather_facts: true + hosts: all + roles: + - role: common_handlers + tags: always + - role: common + tags: common + +- name: Setup Icinga2 + ansible.builtin.import_playbook: playbooks/icinga2.yml + +- name: Set up lime2 server + ansible.builtin.import_playbook: playbooks/lime2.yml + +- name: Set up mail server + ansible.builtin.import_playbook: playbooks/mailserver.yml diff --git a/playbooks/icinga2.yml b/playbooks/icinga2.yml index dbbb881..471a6df 100644 --- a/playbooks/icinga2.yml +++ b/playbooks/icinga2.yml @@ -3,11 +3,6 @@ - name: Setup Icinga2 common things gather_facts: false hosts: all - roles: - - role: common_handlers - tags: always - - role: setup_nftables - tags: nftables tasks: - name: Install required packages tags: install diff --git a/playbooks/lime2.yml b/playbooks/lime2.yml index 71770ac..b9920b3 100644 --- a/playbooks/lime2.yml +++ b/playbooks/lime2.yml @@ -10,11 +10,11 @@ tags: always - role: common tags: common + - role: postfix + tags: postfix - role: forgejo tags: forgejo - role: deux_puissance_x tags: deux_puissance_x - role: tunuifranken tags: tunuifranken - - role: postfix - tags: postfix diff --git a/roles/icinga2_agent/meta/main.yml b/roles/icinga2_agent/meta/main.yml new file mode 100644 index 0000000..0b0dbbe --- /dev/null +++ b/roles/icinga2_agent/meta/main.yml @@ -0,0 +1,4 @@ +--- + +dependencies: + - role: setup_nftables diff --git a/roles/icinga2_master/meta/main.yml b/roles/icinga2_master/meta/main.yml new file mode 100644 index 0000000..0b0dbbe --- /dev/null +++ b/roles/icinga2_master/meta/main.yml @@ -0,0 +1,4 @@ +--- + +dependencies: + - role: setup_nftables