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
shell:
cmd: |
source /etc/profile
./stack.sh 2>&1
sudo su -l stack -c "cd '{{ devstack_dir }}' && ./stack.sh" 2>&1
rc=$?
echo "*** FINISHED ***"
exit $rc

View File

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