add init task
This commit is contained in:
parent
cea833294f
commit
74c4011e4b
@ -1,4 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
certbot_initial_run_enabled: False
|
||||||
certbot_work_dir: /var/lib/letsencrypt
|
certbot_work_dir: /var/lib/letsencrypt
|
||||||
certbot_config_dir: /etc/letsencrypt
|
certbot_config_dir: /etc/letsencrypt
|
||||||
certbot_log_dir: /var/log/letsencrypt
|
certbot_log_dir: /var/log/letsencrypt
|
||||||
|
13
tasks/init.yml
Normal file
13
tasks/init.yml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
- name: Initialise certbot
|
||||||
|
block:
|
||||||
|
- name: Initial run of certbot
|
||||||
|
shell: >
|
||||||
|
certbot
|
||||||
|
--config-dir {{ certbot_config_dir }}
|
||||||
|
--work-dir {{ certbot_work_dir }}
|
||||||
|
--logs-dir {{ certbot_log_dir }}
|
||||||
|
{{ certbot_command_arguments | join(' ') }}
|
||||||
|
become: True
|
||||||
|
become_user: "{{ certbot_user }}"
|
||||||
|
when: certbot_initial_run_enabled
|
@ -34,11 +34,11 @@
|
|||||||
hour: 3
|
hour: 3
|
||||||
user: "{{ certbot_user }}"
|
user: "{{ certbot_user }}"
|
||||||
job: >
|
job: >
|
||||||
"certbot
|
certbot
|
||||||
--config-dir {{ certbot_config_dir }}
|
--config-dir {{ certbot_config_dir }}
|
||||||
--work-dir {{ certbot_work_dir }}
|
--work-dir {{ certbot_work_dir }}
|
||||||
--logs-dir {{ certbot_log_dir }}
|
--logs-dir {{ certbot_log_dir }}
|
||||||
{{ certbot_command_arguments | join(' ') }}"
|
{{ certbot_command_arguments | join(' ') }}
|
||||||
cron_file: "{{ certbot_cronfile | default(omit) }}"
|
cron_file: "{{ certbot_cronfile | default(omit) }}"
|
||||||
when: certbot_scheduler_enabled
|
when: certbot_scheduler_enabled
|
||||||
become: True
|
become: True
|
||||||
|
Loading…
Reference in New Issue
Block a user