Skip to content

Commit d815ead

Browse files
committed
compute repo and env root for caas
1 parent 7e07c41 commit d815ead

File tree

3 files changed

+4
-12
lines changed

3 files changed

+4
-12
lines changed

environments/.caas/hooks/pre.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
---
22

3-
- hosts: all
4-
become: no
5-
gather_facts: no
6-
tasks:
7-
- debug:
8-
msg: |
9-
appliances_environment_root: {{ appliances_environment_root }}
10-
appliances_repository_root: {{ appliances_repository_root }}
11-
- meta: end_here
12-
133
# Provision the infrastructure using Terraform
144
- name: Provision infrastructure
155
hosts: openstack

environments/.caas/inventory/group_vars/all/cluster.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Account for the fact we are running outside of the expected environment system:
2-
appliances_repository_root: "{{ appliances_environment_root + '/../../' | normpath }}"
2+
caas_inventory: "{{ ansible_inventory_sources | last }}" # ansible_inventory_sources is absolute
3+
appliances_environment_root: "{{ caas_inventory | dirname }}"
4+
appliances_repository_root: "{{ appliances_environment_root | dirname | dirname }}"
35

46
# Read the secrets from the Ansible local facts on the control host
57
vault_azimuth_user_password: "{{ hostvars[groups['control'][0]].ansible_local.openhpc_secrets.vault_azimuth_user_password }}"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ update_exclude:
99
- apptainer # see https://github.com/stackhpc/ansible-slurm-appliance/pull/245
1010
update_disablerepo: omit
1111
# Log changes during update here on localhost:
12-
update_log_path: "{{ lookup('env', 'APPLIANCES_ENVIRONMENT_ROOT') }}/logs/{{ inventory_hostname }}-updates.log"
12+
update_log_path: "{{ appliances_environment_root }}/logs/{{ inventory_hostname }}-updates.log"

0 commit comments

Comments
 (0)