File tree Expand file tree Collapse file tree 4 files changed +4
-5
lines changed
common/inventory/group_vars/all
skeleton/{{cookiecutter.environment}} Expand file tree Collapse file tree 4 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 1
1
export APPLIANCES_ENVIRONMENT_ROOT=$(dirname $(realpath ${BASH_SOURCE[0]:-${(%):-%x}}))
2
2
echo "Setting APPLIANCES_ENVIRONMENT_ROOT to $APPLIANCES_ENVIRONMENT_ROOT"
3
3
4
- APPLIANCES_ENVIRONMENT_NAME=$(basename $APPLIANCES_ENVIRONMENT_ROOT)
5
- export PS1="${APPLIANCES_ENVIRONMENT_NAME}/ ${PS1}"
4
+ export PS1="$(basename $APPLIANCES_ENVIRONMENT_ROOT)/ ${PS1}"
6
5
7
6
export APPLIANCES_REPO_ROOT=$(realpath "$APPLIANCES_ENVIRONMENT_ROOT/../..")
8
7
echo "Setting APPLIANCES_REPO_ROOT to $APPLIANCES_REPO_ROOT"
Original file line number Diff line number Diff line change 3
3
ansible_user : rocky
4
4
appliances_repository_root : " {{ lookup('env', 'APPLIANCES_REPO_ROOT') }}"
5
5
appliances_environment_root : " {{ lookup('env', 'APPLIANCES_ENVIRONMENT_ROOT') }}"
6
+ appliances_environment_name : " {{ appliances_environment_root | basename | regex_replace('\\ W+', '') }}" # [a-zA-Z0-9_] only
6
7
# 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
7
8
8
9
# Address(ip/dns) for internal communication between services. This is
Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ openondemand_scrape_configs:
178
178
- targets :
179
179
- " {{ openondemand_address }}:9301"
180
180
labels :
181
- environment : " {{ lookup('env', 'APPLIANCES_ENVIRONMENT_NAME') }}"
181
+ environment : " {{ appliances_environment_name }}"
182
182
service : " openondemand"
183
183
184
184
openondemand_dashboard :
Original file line number Diff line number Diff line change 1
1
export APPLIANCES_ENVIRONMENT_ROOT=$(dirname $(realpath ${BASH_SOURCE[0]:-${(%):-%x}}))
2
2
echo "Setting APPLIANCES_ENVIRONMENT_ROOT to $APPLIANCES_ENVIRONMENT_ROOT"
3
3
4
- APPLIANCES_ENVIRONMENT_NAME=$(basename $APPLIANCES_ENVIRONMENT_ROOT)
5
- export PS1="${APPLIANCES_ENVIRONMENT_NAME}/ ${PS1}"
4
+ export PS1="$(basename $APPLIANCES_ENVIRONMENT_ROOT)/ ${PS1}"
6
5
7
6
export APPLIANCES_REPO_ROOT=$(realpath "$APPLIANCES_ENVIRONMENT_ROOT/../..")
8
7
echo "Setting APPLIANCES_REPO_ROOT to $APPLIANCES_REPO_ROOT"
You can’t perform that action at this time.
0 commit comments