From b7b67f1c862aeb19589ea7181a820feb40bd97ee Mon Sep 17 00:00:00 2001 From: dimti Date: Wed, 8 May 2024 17:39:34 +0300 Subject: [PATCH] * external become_user set for execute nodejs version manager install for possible launch that playbook without become_user interactions (if setting user on execute ansible starter script) --- playbooks/nginx-site.yml | 2 ++ playbooks/nginx-without-db-site.yml | 2 ++ playbooks/own/node-version-manager.yml | 2 -- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/playbooks/nginx-site.yml b/playbooks/nginx-site.yml index 3a0ea0a..6be256e 100644 --- a/playbooks/nginx-site.yml +++ b/playbooks/nginx-site.yml @@ -9,6 +9,8 @@ - import_playbook: debops/redis.yml - import_playbook: own/var-www-set-ownerships.yml - import_playbook: own/node-version-manager.yml + become: true + become_user: '{{ site_name }}' - import_playbook: own/nginx-auth.yml - import_playbook: own/phpmyadmin.yml - import_playbook: own/phpmyadmin-nginx-auth.yml diff --git a/playbooks/nginx-without-db-site.yml b/playbooks/nginx-without-db-site.yml index a85bfca..2b231dc 100644 --- a/playbooks/nginx-without-db-site.yml +++ b/playbooks/nginx-without-db-site.yml @@ -7,6 +7,8 @@ - import_playbook: debops/redis.yml - import_playbook: own/var-www-set-ownerships.yml - import_playbook: own/node-version-manager.yml + become: true + become_user: '{{ site_name }}' - import_playbook: own/nginx-auth.yml - import_playbook: own/correct-paths-for-pct-enter.yml diff --git a/playbooks/own/node-version-manager.yml b/playbooks/own/node-version-manager.yml index 1b3eb5e..ba4e3e6 100644 --- a/playbooks/own/node-version-manager.yml +++ b/playbooks/own/node-version-manager.yml @@ -4,6 +4,4 @@ hosts: [ 'debian10' ] tasks: - name: Install nvm - become: true - become_user: '{{ site_name }}' shell: 'wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash'