diff options
| author | Matthew Fennell <matthew@fennell.dev> | 2026-01-02 13:16:35 +0000 |
|---|---|---|
| committer | Matthew Fennell <matthew@fennell.dev> | 2026-01-02 13:16:35 +0000 |
| commit | c1a5a58d20488272bf0bcc4c4dc2ca11a8ea8fdb (patch) | |
| tree | 458a7ca340c7920f56d6e5e5f98b9ed92debee0e | |
| parent | 4daadd054bcaddff2ac9260b6cebcd31edc95da4 (diff) | |
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.
| -rw-r--r-- | Makefile | 12 | ||||
| -rw-r--r-- | playbook.yaml | 2 |
2 files changed, 7 insertions, 7 deletions
@@ -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 |
