From c1a5a58d20488272bf0bcc4c4dc2ca11a8ea8fdb Mon Sep 17 00:00:00 2001 From: Matthew Fennell Date: Fri, 2 Jan 2026 13:16:35 +0000 Subject: Define all hosts in a single inventory I previously had separate inventories for each environment: prod, transport and staging, with each inventory having a single xmpp_server group. I want to start adopting group_vars so that I can share common variables between hosts, so I've moved all hosts into a common hosts.yaml file with groups for each environment. This means there is no longer an xmpp_server group, and all hosts are in a single inventory. Adjust the playbook to account for this. --- Makefile | 12 ++++++------ playbook.yaml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index de74f4f..d131e5e 100644 --- a/Makefile +++ b/Makefile @@ -10,16 +10,16 @@ check: make staging staging: - ansible-playbook --forks 1 --inventory inventory/staging.ini playbook.yaml \ - --diff + ansible-playbook --forks 1 --inventory inventory/hosts.yaml --limit staging \ + playbook.yaml --diff prod: - ansible-playbook --forks 1 --inventory inventory/prod.ini --inventory \ - inventory/transport.ini playbook.yaml --diff + ansible-playbook --forks 1 --inventory inventory/hosts.yaml --limit prod \ + playbook.yaml --diff transport: - ansible-playbook --forks 1 --inventory inventory/transport.ini \ - playbook.yaml --diff + ansible-playbook --forks 1 --inventory inventory/hosts.yaml --limit \ + transport playbook.yaml --diff lint: precious --ascii lint --all diff --git a/playbook.yaml b/playbook.yaml index 7084f60..0c1fb48 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -6,7 +6,7 @@ - name: Ensure XMPP server is set up gather_facts: false - hosts: xmpp_server + hosts: all tasks: # Now, we create a non-root user with sudo privileges -- cgit v1.2.3