Refactor inventory into OS groups and update playbooks accordingly

Group hosts by OS (ubuntu/rocky) in inventory, refactor playbooks to
use group-targeted plays instead of ansible_os_family conditionals,
add bot host, and add Docker volume backup playbook via rsync to storage.
This commit is contained in:
harwinder
2026-05-16 17:31:29 -04:00
parent 727231821c
commit cf0e62d80c
5 changed files with 208 additions and 144 deletions
+19 -19
View File
@@ -1,20 +1,20 @@
all:
hosts:
webserver:
ansible_host: 192.168.2.15
ansible_user: root
nextcloud:
ansible_host: 192.168.2.120
ansible_user: root
pihole:
ansible_host: 192.168.2.2
ansible_user: root
docker:
ansible_host: 192.168.2.10
ansible_user: root
# eve:
# ansible_host: 192.168.2.12
# ansible_user: root
storage:
ansible_host: 192.168.2.115
ansible_user: root
vars:
ansible_user: root
children:
ubuntu:
hosts:
webserver:
ansible_host: 192.168.2.15
docker:
ansible_host: 192.168.2.10
rocky:
hosts:
pihole:
ansible_host: 192.168.2.2
bot:
ansible_host: 192.168.2.174
storage:
ansible_host: 192.168.2.115
nextcloud:
ansible_host: 192.168.2.120