Avoid sudo's 'secure_path' value from affecting stack.sh/unstack.sh scripts

Change-Id: Iffdf99bb00ec24b95269985aab969fd2c6896676
This commit is contained in:
Federico Ressi 2020-06-29 10:20:39 +02:00
parent 00991af9bd
commit a5d82af9c4
2 changed files with 2 additions and 5 deletions

View File

@ -5,8 +5,7 @@
become_user: stack become_user: stack
shell: shell:
cmd: | cmd: |
source /etc/profile sudo su -l stack -c "cd '{{ devstack_dir }}' && ./stack.sh" 2>&1
./stack.sh 2>&1
rc=$? rc=$?
echo "*** FINISHED ***" echo "*** FINISHED ***"
exit $rc exit $rc

View File

@ -12,12 +12,10 @@
become_user: stack become_user: stack
shell: shell:
cmd: | cmd: |
source /etc/profile sudo su -l stack -c "cd '{{ devstack_dir }}' && ./unstack.sh" 2>&1
./unstack.sh 2>&1
rc=$? rc=$?
echo "*** FINISHED ***" echo "*** FINISHED ***"
exit $rc exit $rc
chdir: '{{ devstack_dir }}'
register: run_unstack register: run_unstack
ignore_errors: yes ignore_errors: yes
when: when: