Adding variables for opting to build hosts file

This commit is contained in:
Matt Burchett
2021-10-16 03:51:26 +00:00
parent 82ec21904c
commit 24104f0480
2 changed files with 4 additions and 0 deletions

View File

@@ -4,6 +4,8 @@ nebula_network_cidr: 24
nebula_ca_cert_duration: "87600h0m0s" #10 years nebula_ca_cert_duration: "87600h0m0s" #10 years
nebula_client_cert_duration: "43800h0m0s" #5 years nebula_client_cert_duration: "43800h0m0s" #5 years
nebula_clean_install: false nebula_clean_install: false
nebula_lighthouse_build_hosts_file: true
nebula_node_lighthouse_in_hosts_file: true
nebula_lighthouse_hostname: lighthouse nebula_lighthouse_hostname: lighthouse
nebula_lighthouse_internal_ip_addr: 192.168.77.1 nebula_lighthouse_internal_ip_addr: 192.168.77.1

View File

@@ -10,11 +10,13 @@
path: /etc/hosts path: /etc/hosts
line: "{{ nebula_internal_ip_addr }} {{ inventory_hostname }}.neb" line: "{{ nebula_internal_ip_addr }} {{ inventory_hostname }}.neb"
delegate_to: "{{ groups.nebula_lighthouse[0] }}" delegate_to: "{{ groups.nebula_lighthouse[0] }}"
when: nebula_lighthouse_build_hosts_file
- name: Ensure node has hosts file entry for lighthouse - name: Ensure node has hosts file entry for lighthouse
lineinfile: lineinfile:
path: /etc/hosts path: /etc/hosts
line: "{{ nebula_lighthouse_internal_ip_addr }} {{ nebula_lighthouse_hostname }}.neb" line: "{{ nebula_lighthouse_internal_ip_addr }} {{ nebula_lighthouse_hostname }}.neb"
when: nebula_node_lighthouse_in_hosts_file
- name: Read cert/key from lighthouse - name: Read cert/key from lighthouse
slurp: slurp: