Skip to content

Commit 4bcc614

Browse files
authored
Merge pull request #798 from stackhpc/fix/caas-upgrade
Fix .caas secrets not persisting post-reimage and skip tofu vars validation for .caas
2 parents 9fb0bf8 + d8b3cf6 commit 4bcc614

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

ansible/roles/persist_openhpc_secrets/tasks/main.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@
1515
- "{{ appliances_state_dir }}/ansible.facts.d"
1616
- "/etc/ansible/facts.d"
1717

18+
- name: Symlink to persisted facts if present
19+
ansible.builtin.file:
20+
state: link
21+
src: "{{ appliances_state_dir }}/ansible.facts.d/openhpc_secrets.fact"
22+
dest: /etc/ansible/facts.d/openhpc_secrets.fact
23+
owner: root
24+
when: openhpc_secrets_stat.stat.exists
25+
1826
- name: Load existing OpenHPC secrets if present
1927
ansible.builtin.setup:
2028
filter: ansible_local

ansible/validate.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
- cluster_home_volume is defined
7878
- cluster_compute_groups is defined
7979
fail_msg: "One or more expected variables are missing: is OpenTofu inventory template up to date?"
80+
when: appliances_validate_tofu_vars | bool
8081

8182
- name: Ensure control node is in inventory
8283
hosts: all
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
appliances_validate_tofu_vars: false

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ appliances_cockpit_state: absent # RHEL cockpit installed but not enabled in gen
88
# 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
99
appliances_mode: configure
1010
appliances_pulp_url: https://ark.stackhpc.com
11+
appliances_validate_tofu_vars: true
1112

1213
# Address(ip/dns) for internal communication between services. This is
1314
# normally traffic you do no want to expose to users.

0 commit comments

Comments
 (0)