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_config_dir: /etc/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
|
||||
user: "{{ certbot_user }}"
|
||||
job: >
|
||||
"certbot
|
||||
certbot
|
||||
--config-dir {{ certbot_config_dir }}
|
||||
--work-dir {{ certbot_work_dir }}
|
||||
--logs-dir {{ certbot_log_dir }}
|
||||
{{ certbot_command_arguments | join(' ') }}"
|
||||
{{ certbot_command_arguments | join(' ') }}
|
||||
cron_file: "{{ certbot_cronfile | default(omit) }}"
|
||||
when: certbot_scheduler_enabled
|
||||
become: True
|
||||
|
Loading…
Reference in New Issue
Block a user