add mode per directory option

This commit is contained in:
Robert Kaussow 2018-06-22 21:39:52 +02:00
parent 93567a8535
commit 08f596e838
2 changed files with 6 additions and 5 deletions

View File

@ -3,7 +3,7 @@ certbot_work_dir: /var/lib/letsencrypt
certbot_config_dir: /etc/letsencrypt
certbot_log_dir: /var/log/letsencrypt
certbot_environment:
- "{{ certbot_work_dir }}"
- "{{ certbot_config_dir }}"
- "{{ certbot_log_dir }}"
- { name: "{{ certbot_work_dir }}", mode: '0755' }
- { name: "{{ certbot_config_dir }}", mode: '0755' }
- { name: "{{ certbot_log_dir }}", mode: '0700' }
certbot_user: root

View File

@ -14,9 +14,10 @@
state: present
- name: Create certbot environment
path: "{{ item }}"
file:
path: "{{ item.name }}"
state: directory
mode: 0755
mode: "{{ item.mode }}"
with_items: "{{ certbot_environment }}"
- name: Deploy config file