From 08f596e838e09e2fd43da64b8b8014ddfa809831 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Fri, 22 Jun 2018 21:39:52 +0200 Subject: [PATCH] add mode per directory option --- defaults/main.yml | 6 +++--- tasks/install.yml | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 5e55acc..48155fa 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -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 diff --git a/tasks/install.yml b/tasks/install.yml index 0123fd1..bb41701 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -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