|
8 | 8 | server_node_ip: "{{ os_metadata.meta.k3s_server }}"
|
9 | 9 | compute_groups: "{{ os_metadata.meta.compute_groups | default([]) }}"
|
10 | 10 |
|
11 |
| - # TODO: "role defaults" |
| 11 | + # TODO: "= role defaults" - could be moved to a vars_file: on play with similar precedence effects |
| 12 | + # this is a good example: common environment actually defines this (non-functional w/o compute groups), but role default is empty |
12 | 13 | resolv_conf_nameservers: []
|
13 |
| - |
14 |
| - # nfs_configurations: |
15 |
| - # - nfs_export: "/exports/home" |
16 |
| - # nfs_client_mnt_options: |
17 |
| - # nfs_client_mnt_point: "/home" |
18 |
| - # nfs_client_mnt_state: mounted |
19 |
| - # nfs_server: "{{ server_node_ip }}" |
20 |
| - |
21 |
| - # os_manila_mount_state: mounted |
22 |
| - # os_manila_mount_opts: |
23 |
| - # - x-systemd.device-timeout=30 |
24 |
| - # - x-systemd.mount-timeout=30 |
25 |
| - # - noatime |
26 |
| - # - _netdev # prevents mount blocking early boot before networking available |
27 |
| - # - rw |
28 |
| - # os_manila_mount_ceph_conf_path: /etc/ceph |
29 |
| - |
30 |
| - # basic_users_manage_homedir: false |
31 |
| - # basic_users_userdefaults: |
32 |
| - # state: present |
33 |
| - # create_home: "{{ basic_users_manage_homedir }}" |
34 |
| - # generate_ssh_key: "{{ basic_users_manage_homedir }}" |
35 |
| - # ssh_key_comment: "{{ item.name }}" |
36 |
| - # test_user_password: "zXpcWyGQL7jtZnqylQra4g==" |
37 |
| - # basic_users_users: |
38 |
| - # - name: testuser # can't use rocky as $HOME isn't shared! |
39 |
| - # password: "{{ test_user_password | password_hash('sha512', 65534 | random(seed=inventory_hostname) | string) }}" # idempotent |
40 |
| - # uid: 1005 |
41 |
| - # basic_users_groups: [] |
42 |
| - |
43 |
| - # openhpc_conf_server: "{{ server_node_ip }}" |
44 |
| - |
| 14 | + |
45 | 15 | tasks:
|
46 | 16 | - block:
|
47 | 17 | - name: Report skipping initialization if not compute node
|
|
80 | 50 |
|
81 | 51 | - meta: end_play
|
82 | 52 | when: _mount_mnt_cluster.failed
|
| 53 | + |
| 54 | + - name: Load hostvars from NFS |
| 55 | + # this is higher priority than vars block = normal ansible's hostvars |
| 56 | + include_vars: |
| 57 | + file: "/mnt/cluster/hostvars/{{ ansible_hostname }}/hostvars.yml" # can't use inventory_hostname |
| 58 | + |
| 59 | + - name: Demonstrate hostvars have loaded |
| 60 | + debug: |
| 61 | + var: prometheus_version |
0 commit comments