From 9ca373f9bbd8029b8db52032129e2b69639c1bf5 Mon Sep 17 00:00:00 2001 From: Quotengrote <38253905+quotengrote@users.noreply.github.com> Date: Mon, 19 Oct 2020 10:10:50 +0200 Subject: [PATCH] =?UTF-8?q?Bugfix:=20dotfiles=20geh=C3=B6ren=20jetzt=20dem?= =?UTF-8?q?=20Nutzer=20und=20nciht=20mehr=20root=20(#53)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inventories/group_vars/all.yml | 2 +- roles/mgrote.dotfiles/tasks/main.yml | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/inventories/group_vars/all.yml b/inventories/group_vars/all.yml index 61795700..c68a684b 100644 --- a/inventories/group_vars/all.yml +++ b/inventories/group_vars/all.yml @@ -28,7 +28,7 @@ tmux_standardsession_name: "default" ### mgrote.dotfiles dotfiles_local_repo_directory: "/home/mg/dotfiles-repo" - dotfiles_user: "mg" + dotfiles_user: mg dotfiles_link_target: "/home/mg" dotfiles_remote_repo: "https://github.com/quotengrote/dotfiles" dotfiles_files_to_copy: diff --git a/roles/mgrote.dotfiles/tasks/main.yml b/roles/mgrote.dotfiles/tasks/main.yml index 7d29ea97..32bd16ef 100644 --- a/roles/mgrote.dotfiles/tasks/main.yml +++ b/roles/mgrote.dotfiles/tasks/main.yml @@ -3,6 +3,11 @@ file: path: "{{ dotfiles_local_repo_directory }}" state: directory + owner: "{{ dotfiles_user }}" + group: "{{ dotfiles_user }}" + recurse: yes + mode: 0644 + # noqa [401] - name: clone repository become: true @@ -22,6 +27,8 @@ src: "{{ dotfiles_local_repo_directory }}/{{ item }}" dest: "{{ dotfiles_link_target }}/{{ item }}" owner: "{{ dotfiles_user }}" + group: "{{ dotfiles_user }}" + mode: 0644 state: link force: yes with_items: "{{ dotfiles_files_to_copy }}"