add template for cli.ini

This commit is contained in:
Robert Kaussow 2018-06-22 21:57:22 +02:00
parent 243648c961
commit 2c1c1b97a2
3 changed files with 22 additions and 2 deletions

View File

@ -7,3 +7,8 @@ certbot_environment:
- { name: "{{ certbot_config_dir }}", mode: '0755' }
- { name: "{{ certbot_log_dir }}", mode: '0700' }
certbot_user: root
certbot_preferred_challenges: dns
certbot_server: https://acme-v02.api.letsencrypt.org/directory
certbot_email: mail@example.com
certbot_rsa_key_size: 4096

View File

@ -24,7 +24,7 @@
- name: Deploy config file
template:
src: etc/ssh/sshd_config.j2
dest: /etc/ssh/sshd_config
src: conf/cli.ini.j2
dest: " {{ certbot_config_dir }} "
become: True
become_user: "{{ certbot_user }}"

View File

@ -0,0 +1,15 @@
#jinja2: trim_blocks: True, lstrip_blocks: True
# {{ ansible_managed }}
{% if certbot_preferred_challenges is defined %}
preferred-challenges = {{ certbot_preferred_challenges }}
{% endif %}
{% if certbot_server is defined %}
server = {{ certbot_server }}
{% endif %}
{% if certbot_email is defined %}
email = {{ certbot_email }}
{% endif %}
{% if certbot_rsa_key_size is defined %}
rsa-key-size = {{ certbot_rsa_key_size }}
{% endif %}