Skip to content

Commit 4fbdaa2

Browse files
committed
remove envvar APPLIANCES_ENVIRONMENT_NAME
1 parent c700bca commit 4fbdaa2

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

environments/.stackhpc/activate

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
export APPLIANCES_ENVIRONMENT_ROOT=$(dirname $(realpath ${BASH_SOURCE[0]:-${(%):-%x}}))
22
echo "Setting APPLIANCES_ENVIRONMENT_ROOT to $APPLIANCES_ENVIRONMENT_ROOT"
33

4-
APPLIANCES_ENVIRONMENT_NAME=$(basename $APPLIANCES_ENVIRONMENT_ROOT)
5-
export PS1="${APPLIANCES_ENVIRONMENT_NAME}/ ${PS1}"
4+
export PS1="$(basename $APPLIANCES_ENVIRONMENT_ROOT)/ ${PS1}"
65

76
export APPLIANCES_REPO_ROOT=$(realpath "$APPLIANCES_ENVIRONMENT_ROOT/../..")
87
echo "Setting APPLIANCES_REPO_ROOT to $APPLIANCES_REPO_ROOT"

environments/common/inventory/group_vars/all/defaults.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
ansible_user: rocky
44
appliances_repository_root: "{{ lookup('env', 'APPLIANCES_REPO_ROOT') }}"
55
appliances_environment_root: "{{ lookup('env', 'APPLIANCES_ENVIRONMENT_ROOT') }}"
6+
appliances_environment_name: "{{ appliances_environment_root | basename | regex_replace('\\W+', '') }}" # [a-zA-Z0-9_] only
67
#appliances_state_dir: # define an absolute path here to use for persistent state: NB: This is defined as /var/lib/state in inventory by the default Terraform
78

89
# Address(ip/dns) for internal communication between services. This is

environments/common/inventory/group_vars/all/openondemand.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ openondemand_scrape_configs:
178178
- targets:
179179
- "{{ openondemand_address }}:9301"
180180
labels:
181-
environment: "{{ lookup('env', 'APPLIANCES_ENVIRONMENT_NAME') }}"
181+
environment: "{{ appliances_environment_name }}"
182182
service: "openondemand"
183183

184184
openondemand_dashboard:

environments/skeleton/{{cookiecutter.environment}}/activate

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
export APPLIANCES_ENVIRONMENT_ROOT=$(dirname $(realpath ${BASH_SOURCE[0]:-${(%):-%x}}))
22
echo "Setting APPLIANCES_ENVIRONMENT_ROOT to $APPLIANCES_ENVIRONMENT_ROOT"
33

4-
APPLIANCES_ENVIRONMENT_NAME=$(basename $APPLIANCES_ENVIRONMENT_ROOT)
5-
export PS1="${APPLIANCES_ENVIRONMENT_NAME}/ ${PS1}"
4+
export PS1="$(basename $APPLIANCES_ENVIRONMENT_ROOT)/ ${PS1}"
65

76
export APPLIANCES_REPO_ROOT=$(realpath "$APPLIANCES_ENVIRONMENT_ROOT/../..")
87
echo "Setting APPLIANCES_REPO_ROOT to $APPLIANCES_REPO_ROOT"

0 commit comments

Comments
 (0)