From c054d22c4818d916ac6dd9c8d7a7a2c614408e17 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 20 Aug 2023 23:02:06 +0200 Subject: append .j2 extension to templates I saw a good point somewhere that it should help with syntax highlighting. --- roles/letsencrypt/tasks/digitalocean.yml | 2 +- roles/letsencrypt/tasks/domain.yml | 2 +- roles/letsencrypt/templates/certbot.ini | 3 --- roles/letsencrypt/templates/certbot.ini.j2 | 3 +++ roles/letsencrypt/templates/domain_list.txt | 5 ----- roles/letsencrypt/templates/domain_list.txt.j2 | 5 +++++ 6 files changed, 10 insertions(+), 10 deletions(-) delete mode 100644 roles/letsencrypt/templates/certbot.ini create mode 100644 roles/letsencrypt/templates/certbot.ini.j2 delete mode 100644 roles/letsencrypt/templates/domain_list.txt create mode 100644 roles/letsencrypt/templates/domain_list.txt.j2 (limited to 'roles/letsencrypt') diff --git a/roles/letsencrypt/tasks/digitalocean.yml b/roles/letsencrypt/tasks/digitalocean.yml index 6cb1198..42f4ec0 100644 --- a/roles/letsencrypt/tasks/digitalocean.yml +++ b/roles/letsencrypt/tasks/digitalocean.yml @@ -21,7 +21,7 @@ - name: Configure certbot.ini ansible.builtin.template: - src: certbot.ini + src: certbot.ini.j2 dest: '{{ certbot_ini }}' owner: root group: root diff --git a/roles/letsencrypt/tasks/domain.yml b/roles/letsencrypt/tasks/domain.yml index d3cb50a..636230a 100644 --- a/roles/letsencrypt/tasks/domain.yml +++ b/roles/letsencrypt/tasks/domain.yml @@ -6,7 +6,7 @@ block: - name: Cache domain list ansible.builtin.template: - src: domain_list.txt + src: domain_list.txt.j2 dest: '/etc/letsencrypt/.domains_{{ certificate_name }}.txt' owner: root group: root diff --git a/roles/letsencrypt/templates/certbot.ini b/roles/letsencrypt/templates/certbot.ini deleted file mode 100644 index 71095d6..0000000 --- a/roles/letsencrypt/templates/certbot.ini +++ /dev/null @@ -1,3 +0,0 @@ -{{ ansible_managed | comment }} - -dns_digitalocean_token = {{ digitalocean_token }} diff --git a/roles/letsencrypt/templates/certbot.ini.j2 b/roles/letsencrypt/templates/certbot.ini.j2 new file mode 100644 index 0000000..71095d6 --- /dev/null +++ b/roles/letsencrypt/templates/certbot.ini.j2 @@ -0,0 +1,3 @@ +{{ ansible_managed | comment }} + +dns_digitalocean_token = {{ digitalocean_token }} diff --git a/roles/letsencrypt/templates/domain_list.txt b/roles/letsencrypt/templates/domain_list.txt deleted file mode 100644 index d45c7f0..0000000 --- a/roles/letsencrypt/templates/domain_list.txt +++ /dev/null @@ -1,5 +0,0 @@ -{{ ansible_managed | comment }} - -{% for domain in certificate_domains %} -{{ domain }} -{% endfor %} diff --git a/roles/letsencrypt/templates/domain_list.txt.j2 b/roles/letsencrypt/templates/domain_list.txt.j2 new file mode 100644 index 0000000..d45c7f0 --- /dev/null +++ b/roles/letsencrypt/templates/domain_list.txt.j2 @@ -0,0 +1,5 @@ +{{ ansible_managed | comment }} + +{% for domain in certificate_domains %} +{{ domain }} +{% endfor %} -- cgit v1.2.3