From fa811dd7876fd7fec01f0d6597323a66cdfa3575 Mon Sep 17 00:00:00 2001 From: Alexander Dahl Date: Tue, 20 Dec 2022 09:33:34 +0100 Subject: [PATCH] :ok_hand: prosody: Use plain file instead of template No need to run the template engine, if no replacements are done. Suggested-by: David Kilias --- .../prosody/jabber.n39.eu.cfg.lua | 0 .../prosody/localhost.cfg.lua | 0 host-pottwal.yml | 12 ++++++------ 3 files changed, 6 insertions(+), 6 deletions(-) rename templates/prosody/jabber.n39.eu.cfg.lua.j2 => files/prosody/jabber.n39.eu.cfg.lua (100%) rename templates/prosody/localhost.cfg.lua.j2 => files/prosody/localhost.cfg.lua (100%) diff --git a/templates/prosody/jabber.n39.eu.cfg.lua.j2 b/files/prosody/jabber.n39.eu.cfg.lua similarity index 100% rename from templates/prosody/jabber.n39.eu.cfg.lua.j2 rename to files/prosody/jabber.n39.eu.cfg.lua diff --git a/templates/prosody/localhost.cfg.lua.j2 b/files/prosody/localhost.cfg.lua similarity index 100% rename from templates/prosody/localhost.cfg.lua.j2 rename to files/prosody/localhost.cfg.lua diff --git a/host-pottwal.yml b/host-pottwal.yml index 0668636..9eb30f7 100644 --- a/host-pottwal.yml +++ b/host-pottwal.yml @@ -132,8 +132,8 @@ mode: 0644 - name: Ensure prosody localhost config file is in place - ansible.builtin.template: - src: "templates/prosody/localhost.cfg.lua.j2" + ansible.builtin.copy: + src: "files/prosody/localhost.cfg.lua" dest: "{{ prosody_data_dir }}/etc/prosody/conf.avail/localhost.cfg.lua" mode: 0644 @@ -143,13 +143,13 @@ dest: "{{ prosody_data_dir }}/etc/prosody/conf.d/localhost.cfg.lua" state: link - - name: "Ensure prosody {{ prosody_domain_name }} config file is in place" - ansible.builtin.template: - src: "templates/prosody/{{ prosody_domain_name }}.cfg.lua.j2" + - name: "Ensure prosody config file is in place: {{ prosody_domain_name }}" + ansible.builtin.copy: + src: "files/prosody/{{ prosody_domain_name }}.cfg.lua" dest: "{{ prosody_data_dir }}/etc/prosody/conf.avail/{{ prosody_domain_name }}.cfg.lua" mode: 0644 - - name: "Ensure prosody {{ prosody_domain_name }} config symlink exists" + - name: "Ensure prosody config symlink exists: {{ prosody_domain_name }}" ansible.builtin.file: src: "../conf.avail/{{ prosody_domain_name }}.cfg.lua" dest: "{{ prosody_data_dir }}/etc/prosody/conf.d/{{ prosody_domain_name }}.cfg.lua"