We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19af5a9 commit d05208bCopy full SHA for d05208b
ansible/roles/compute_init/files/compute-init.yml
@@ -95,6 +95,20 @@
95
- meta: end_play
96
when: _mount_mnt_cluster.failed
97
98
+ - name: Check if hostvars exist
99
+ stat:
100
+ path: "/mnt/cluster/hostvars/{{ ansible_hostname }}/hostvars.yml"
101
+ register: hostvars_stat
102
+
103
+ - block:
104
+ - name: Report skipping initialization if host vars does not exist
105
+ # meta: end_play produces no output
106
+ debug:
107
+ msg: "Skipping compute initialization: hostvars does not exist"
108
109
+ - meta: end_play
110
+ when: not hostvars_stat.stat.exists
111
112
- name: Load hostvars from NFS
113
# this is higher priority than vars block = normal ansible's hostvars
114
include_vars:
0 commit comments