edit the host-ansible-conf helper scripts to use envvar instead of the templated var
This commit is contained in:
parent
e33bd3e90c
commit
711b81dd99
|
|
@ -116,6 +116,8 @@ fi
|
|||
|
||||
export PATH="/usr/sbin:${PATH}"
|
||||
|
||||
export ANSIBLECONF_DIR="{{ ansibleconf_directory }}"
|
||||
|
||||
export EDITOR=vim
|
||||
|
||||
# To fix weird terminal behaviour when in SSH
|
||||
|
|
|
|||
|
|
@ -25,14 +25,14 @@ if [ -e $USBKEYVAR ]; then
|
|||
fi
|
||||
if [[ "$FILENAME" == *"server"* ]]; then
|
||||
echo "Detected as a server playbook file, decrypting accordingly..."
|
||||
if ansible-playbook -e @{{ ansibleconf_directory }}/serversecrets.enc --vault-password-file $USBKEYSLOCATION/serversecrets $ABSOLUTELOCATION; then
|
||||
if ansible-playbook -e @$ANSIBLECONF_DIR/serversecrets.enc --vault-password-file $USBKEYSLOCATION/serversecrets $ABSOLUTELOCATION; then
|
||||
echo "Ansible Playbook success!"
|
||||
else
|
||||
echo "Ansible Playbook failure!"
|
||||
fi
|
||||
elif [[ "$FILENAME" == *"service"* ]]; then
|
||||
echo "Detected as a service playbook file, decrypting accordingly..."
|
||||
if ansible-playbook -e @{{ ansibleconf_directory }}/serversecrets.enc --vault-password-file $USBKEYSLOCATION/serversecrets -e @{{ ansibleconf_directory }}/services/$FILEPARENTDIR/servicesecrets.enc --vault-password-file $USBKEYSLOCATION/servicesecrets $ABSOLUTELOCATION; then
|
||||
if ansible-playbook -e @$ANSIBLECONF_DIR/serversecrets.enc --vault-password-file $USBKEYSLOCATION/serversecrets -e @$ANSIBLECONF_DIR/services/$FILEPARENTDIR/servicesecrets.enc --vault-password-file $USBKEYSLOCATION/servicesecrets $ABSOLUTELOCATION; then
|
||||
echo "Ansible Playbook success!"
|
||||
else
|
||||
echo "Ansible Playbook failure!"
|
||||
|
|
|
|||
Loading…
Reference in New Issue