From 375f7a47425867eb781ac0d626bded21c80ea51b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Thu, 8 Feb 2024 13:31:31 +0100 Subject: refactor: split main playbook in sub-playbooks --- site.all.yml | 61 ++++++++++++------------------------------------------- site.network.yml | 6 ++++++ site.services.yml | 8 ++++++++ site.system.yml | 9 ++++++++ 4 files changed, 36 insertions(+), 48 deletions(-) create mode 100644 site.network.yml create mode 100644 site.services.yml create mode 100644 site.system.yml diff --git a/site.all.yml b/site.all.yml index 761c0f7..30fecdd 100644 --- a/site.all.yml +++ b/site.all.yml @@ -1,54 +1,19 @@ --- -- hosts: all - roles: - - role: wireguard +- name: include system playbook + ansible.builtin.import_playbook: site.system.yml -- hosts: servers - roles: - - role: sshd +- name: include network playbook + ansible.builtin.import_playbook: site.network.yml -- hosts: servers:!dc0 - roles: - - role: prometheus - - role: loki +- name: include services playbook + ansible.builtin.import_playbook: site.services.yml -- hosts: dc0 - roles: - - role: pf - - role: relayd - - role: acme - - role: cgit - - role: znc - # internal git user and directory - different than the public one for cgit - - role: git - git_dir: /data/git-internal - git_user: git-internal +# # internal git user and directory - different than the public one for cgit +# - role: git +# git_dir: /data/git-internal +# git_user: git-internal -- hosts: stack0 - roles: - - role: nfsd - -- hosts: stack0-* - roles: - - role: nfsclient - -- hosts: stack0-dc1 - roles: - - role: grafana - -- hosts: stack0-dev0,stack0-dc1 - roles: - - role: cgit - -- hosts: stack0-cld0 - roles: - - role: miniflux - -- hosts: servers - roles: - - role: httpd - -- hosts: stack0 - roles: - - role: vmm +# - hosts: all +# roles: +# - role: wireguard diff --git a/site.network.yml b/site.network.yml new file mode 100644 index 0000000..e325da5 --- /dev/null +++ b/site.network.yml @@ -0,0 +1,6 @@ +--- + +- hosts: ams-dcontroller-01 + roles: + - role: sshd + - role: pf diff --git a/site.services.yml b/site.services.yml new file mode 100644 index 0000000..c32a202 --- /dev/null +++ b/site.services.yml @@ -0,0 +1,8 @@ +--- + +- hosts: ams-dcontroller-01 + roles: + - role: nextcloud + - role: httpd + - role: relayd + - role: acme diff --git a/site.system.yml b/site.system.yml new file mode 100644 index 0000000..282450a --- /dev/null +++ b/site.system.yml @@ -0,0 +1,9 @@ +--- + +- hosts: ams-dcontroller-01 + roles: + - role: prerequisites + - role: hostname + - role: unix_users + - role: toolbox + - role: update -- cgit v1.2.3