diff --git a/roles/0-init/tasks/main.yml b/roles/0-init/tasks/main.yml index 85fcd02dc..802739623 100644 --- a/roles/0-init/tasks/main.yml +++ b/roles/0-init/tasks/main.yml @@ -56,7 +56,7 @@ - name: "Time Zone / TZ: Set symlink /etc/localtime to UTC if it doesn't exist?" include_tasks: tz.yml -- name: Test Gateway + Test Internet + Set new hostname if nec + Set 'gui_port' to 80 or 443 for Admin Console +- name: Test Gateway + Test Internet + Set new hostname/domain if nec + Set 'gui_port' to 80 or 443 for Admin Console include_tasks: network.yml diff --git a/roles/0-init/tasks/network.yml b/roles/0-init/tasks/network.yml index 4680672a0..01ed1a55f 100644 --- a/roles/0-init/tasks/network.yml +++ b/roles/0-init/tasks/network.yml @@ -46,15 +46,18 @@ iiab_fqdn: "{{ iiab_hostname }}.{{ iiab_domain }}" FQDN_changed: False -- name: "Set 'FQDN_changed: True' when iiab_fqdn != ansible_fqdn ({{ ansible_fqdn }})" +- name: Set hostname / domain (etc) in various places -- if iiab_fqdn != ansible_fqdn ({{ ansible_fqdn }}) + include_tasks: hostname.yml + when: iiab_fqdn != ansible_fqdn + +# 2021-07-30: FQDN_changed isn't used as in the past -- its remaining use is +# for {named, dhcpd, squid} in roles/network/tasks/main.yml -- possibly it +# should be reconsidered? See PR #2876: roles/network might become optional? +- name: "Also set 'FQDN_changed: True' -- if iiab_fqdn != ansible_fqdn ({{ ansible_fqdn }})" set_fact: FQDN_changed: True when: iiab_fqdn != ansible_fqdn -- name: Set hostname if FQDN_changed - include_tasks: hostname.yml - when: FQDN_changed - - name: "Set 'gui_port: 80' for Admin Console if not adm_cons_force_ssl" set_fact: diff --git a/roles/0-init/tasks/tz.yml b/roles/0-init/tasks/tz.yml index 30b7e2118..017947a05 100644 --- a/roles/0-init/tasks/tz.yml +++ b/roles/0-init/tasks/tz.yml @@ -11,7 +11,7 @@ register: etc_localtime - name: "/etc/localtime now specifies: {{ etc_localtime.stdout }}" - command: echo # 'meta: noop' is not enough to force var instantiation above + command: echo # 'meta: noop' is not enough to force instantiation of 'name: {{ var }}' just above #- name: Check for a /etc/localtime symlink to TZ - NEVER FAILS DUE TO PIPE