From f37199ee4e0c91ce73d3f1693d83c40bcd203fa3 Mon Sep 17 00:00:00 2001 From: Jonathan Cobb Date: Wed, 15 Jan 2020 00:25:11 -0500 Subject: [PATCH] fix tilde paths --- automation/roles/bubble/templates/refresh_bubble_ssh_keys.sh.j2 | 2 +- automation/roles/bubble/templates/snapshot_ansible.sh.j2 | 2 +- bubble-server/src/main/resources/ansible/install_local.sh.hbs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/automation/roles/bubble/templates/refresh_bubble_ssh_keys.sh.j2 b/automation/roles/bubble/templates/refresh_bubble_ssh_keys.sh.j2 index 912b73a5..a0793fc3 100644 --- a/automation/roles/bubble/templates/refresh_bubble_ssh_keys.sh.j2 +++ b/automation/roles/bubble/templates/refresh_bubble_ssh_keys.sh.j2 @@ -38,7 +38,7 @@ done # Retain self-generated ansible setup key ANSIBLE_USER="{{admin_user}}" if [[ ! -z "${ANSIBLE_USER}" ]] ; then - PUB_FILE="$(cd "~{{admin_user}}" && pwd)/.ssh/bubble_rsa.pub" + PUB_FILE="$(cd ~{{admin_user}} && pwd)/.ssh/bubble_rsa.pub" if [[ -f "${PUB_FILE}" ]] ; then cat "${PUB_FILE}" >> ${NEW_KEYS} fi diff --git a/automation/roles/bubble/templates/snapshot_ansible.sh.j2 b/automation/roles/bubble/templates/snapshot_ansible.sh.j2 index 6c181692..635fcb9c 100644 --- a/automation/roles/bubble/templates/snapshot_ansible.sh.j2 +++ b/automation/roles/bubble/templates/snapshot_ansible.sh.j2 @@ -23,7 +23,7 @@ if [[ $(whoami) != "{{ admin_user }}" ]] ; then die "${0} must be run as {{ admin_user }}" fi -ANSIBLE_USER_HOME=$(cd "~{{ admin_user }}" && pwd) +ANSIBLE_USER_HOME=$(cd ~{{ admin_user }} && pwd) ANSIBLE_SNAPSHOT="/home/bubble/ansible.tgz" diff --git a/bubble-server/src/main/resources/ansible/install_local.sh.hbs b/bubble-server/src/main/resources/ansible/install_local.sh.hbs index a9f5fd36..7674f344 100644 --- a/bubble-server/src/main/resources/ansible/install_local.sh.hbs +++ b/bubble-server/src/main/resources/ansible/install_local.sh.hbs @@ -1,7 +1,7 @@ #!/bin/bash ANSIBLE_USER="{{node.user}}" -ANSIBLE_HOME="$(cd "~{{node.user}}" && pwd)" +ANSIBLE_HOME="$(cd ~{{node.user}} && pwd)" LOG="${ANSIBLE_HOME}/.ansible.log" function log {