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 4a3074b commit e3ce492Copy full SHA for e3ce492
ansible/roles/compute_init/files/compute-init.yml
@@ -3,9 +3,10 @@
3
- name: Compute node initialisation
4
hosts: localhost
5
become: yes
6
- # VARS TO BE SUPPLIED VIA CLOUD INIT METADATA
7
vars:
8
- server_node_ip: "172.16.1.154"
+ os_metadata: "{{ lookup('url', 'http://169.254.169.254/openstack/latest/meta_data.json') | from_json }}"
+ server_node_ip: "{{ os_metadata.meta.k3s_server }}"
9
+
10
resolv_conf_nameservers: [1.1.1.1, 8.8.8.8]
11
12
nfs_configurations:
@@ -78,7 +79,7 @@
78
79
- name: Mount /mnt/cluster
80
mount:
81
path: /mnt/cluster
- src: "{{ vars.server_node_ip }}:/exports/cluster"
82
+ src: "{{ server_node_ip }}:/exports/cluster"
83
fstype: nfs
84
opts: rw,sync
85
state: mounted
0 commit comments