diff options
author | Matthew Fennell <matthew@fennell.dev> | 2024-01-07 12:46:01 +0000 |
---|---|---|
committer | Matthew Fennell <matthew@fennell.dev> | 2024-01-07 12:46:01 +0000 |
commit | 2e8dc1ce1150eb8c370808a2ddb16c515f0d4cbd (patch) | |
tree | f3d385ff59ad903c0e827d0c5b3fa27796ec4d98 /playbook.yaml | |
parent | 14465fc9602ec96fc9d4e48bc0120e75415e1e26 (diff) |
Add virtual host specific config
This commit uses the new per-host virtual_host variable to create the necessary
prosody host-specific cfg files.
Diffstat (limited to 'playbook.yaml')
-rw-r--r-- | playbook.yaml | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/playbook.yaml b/playbook.yaml index b396d21..3da1246 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -26,7 +26,7 @@ - WWW - XMPP become: true - - name: Ensure prosody is configured + - name: Ensure top-level prosody configuration is installed ansible.builtin.copy: src: "{{ playbook_dir }}/files/prosody.cfg.lua" dest: /etc/prosody/prosody.cfg.lua @@ -34,6 +34,22 @@ group: root mode: "0640" become: true + - name: Ensure host-specific prosody configuration is available + ansible.builtin.template: + src: "{{ playbook_dir }}/files/virtual_host.cfg.lua.j2" + dest: "/etc/prosody/conf.avail/{{ virtual_host }}.cfg.lua" + owner: root + group: root + mode: "0644" + become: true + - name: Ensure host-specific prosody configuration is set + ansible.builtin.file: + src: "/etc/prosody/conf.avail/{{ virtual_host }}.cfg.lua" + dest: "/etc/prosody/conf.d/{{ virtual_host }}.cfg.lua" + owner: root + group: root + state: link + become: true - name: Ensure prosody config is reloaded ansible.builtin.service: name: prosody |