From 795dfc152dfaa573d7d349be5a9b44340b95615d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=B6rber?= Date: Sun, 14 Apr 2019 11:55:01 +0200 Subject: [PATCH] Specify mode for empty directories --- dotfiles.yml | 5 +++-- playbook.yml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dotfiles.yml b/dotfiles.yml index e92cba5..3876419 100644 --- a/dotfiles.yml +++ b/dotfiles.yml @@ -1,6 +1,7 @@ empty_directories: - - .i3 - - .gnupg + - name: .i3 + - name: .gnupg + mode: '0700' dotfiles: - from: autostart.sh to: .autostart.sh diff --git a/playbook.yml b/playbook.yml index 90443de..075ef8c 100644 --- a/playbook.yml +++ b/playbook.yml @@ -174,7 +174,7 @@ - name: get state of empty directories stat: - path: ~/{{ item }} + path: ~/{{ item.name }} register: empty_dir_stat with_items: "{{ empty_directories }}" tags: @@ -192,7 +192,8 @@ - name: create empty directories for dotfiles file: state: directory - path: ~/{{ item }} + path: ~/{{ item.name }} + mode: "{{ item.mode | default('0755') }}" with_items: "{{ empty_directories }}" tags: - dotfiles