From 0aaed04abcc730bc2d1787274c65fc962660ab86 Mon Sep 17 00:00:00 2001 From: Yuri Niyazov Date: Sun, 14 May 2017 19:43:23 -0700 Subject: [PATCH 1/4] Allow directory trees in dotfiles lists --- tasks/main.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tasks/main.yml b/tasks/main.yml index 04055c2..3d74453 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -22,6 +22,13 @@ when: "'@' not in item.1.stdout" with_indexed_items: "{{ existing_dotfile_info.results }}" +- name: Ensure parent folders of link dotfiles exist. + file: + path: "{{ (dotfiles_home ~ '/' ~ item) | dirname }}" + state: directory + follow: yes + with_items: "{{ dotfiles_files }}" + - name: Link dotfiles into home folder. file: src: "{{ dotfiles_repo_local_destination }}/{{ item }}" From 73a5be772790432e3cf954ef3622762f4814f2a1 Mon Sep 17 00:00:00 2001 From: Yuri Niyazov Date: Thu, 15 Mar 2018 23:03:16 -0700 Subject: [PATCH 2/4] We often use become: yes in the main playbook. --- tasks/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks/main.yml b/tasks/main.yml index 3d74453..5422d4e 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -27,6 +27,7 @@ path: "{{ (dotfiles_home ~ '/' ~ item) | dirname }}" state: directory follow: yes + become: no with_items: "{{ dotfiles_files }}" - name: Link dotfiles into home folder. From 15a9ce0990e5bce723d9e2fed9dde5603e40b04d Mon Sep 17 00:00:00 2001 From: Jeff Geerling Date: Wed, 4 Dec 2024 12:08:17 -0600 Subject: [PATCH 3/4] Update tasks/main.yml --- tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/main.yml b/tasks/main.yml index 5422d4e..8f48b4c 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -26,7 +26,7 @@ file: path: "{{ (dotfiles_home ~ '/' ~ item) | dirname }}" state: directory - follow: yes + follow: true become: no with_items: "{{ dotfiles_files }}" From 65ca3d15cda358c2b55c62085fb6c03146fb7e1b Mon Sep 17 00:00:00 2001 From: Jeff Geerling Date: Wed, 4 Dec 2024 12:08:22 -0600 Subject: [PATCH 4/4] Update tasks/main.yml --- tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/main.yml b/tasks/main.yml index 8f48b4c..d20e238 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -27,7 +27,7 @@ path: "{{ (dotfiles_home ~ '/' ~ item) | dirname }}" state: directory follow: true - become: no + become: false with_items: "{{ dotfiles_files }}" - name: Link dotfiles into home folder.