From 74276140569fd639448a5db4f76e5a36e3e295ce Mon Sep 17 00:00:00 2001 From: rene Date: Fri, 18 Mar 2022 16:54:46 +0100 Subject: [PATCH] execute tasks as user mastodon --- roles/mastodon/tasks/main.yml | 4 ++++ roles/mastodon/tasks/system_setup/ruby.yml | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/roles/mastodon/tasks/main.yml b/roles/mastodon/tasks/main.yml index 3b37433..9bf6b1d 100644 --- a/roles/mastodon/tasks/main.yml +++ b/roles/mastodon/tasks/main.yml @@ -17,5 +17,9 @@ - include_tasks: system_setup/nginx.yml - include_tasks: system_setup/user.yml - include_tasks: system_setup/ruby.yml + become: true + become_user: "{{ mastodon_user }}" - include_tasks: system_setup/mastodon.yml + become: true + become_user: "{{ mastodon_user }}" - include_tasks: system_setup/letsencrypt.yml \ No newline at end of file diff --git a/roles/mastodon/tasks/system_setup/ruby.yml b/roles/mastodon/tasks/system_setup/ruby.yml index 1202a1f..15608ec 100644 --- a/roles/mastodon/tasks/system_setup/ruby.yml +++ b/roles/mastodon/tasks/system_setup/ruby.yml @@ -27,8 +27,8 @@ when: rbenv_configure is succeeded - name: mastodon | Update profile settings - copy: - dest: "~/.bashrc" + blockinfile: + dest: "~/.profile" content: | export PATH="~/.rbenv/bin:${PATH}" eval "$(rbenv init -)"