# Currently EXCLUDED # Kind of post-install. We can include this in maitain later. # We should not do it before Gluster peers are probed, otherwise everything will fail. # Some peers will have names and others IPs. - name: Configure all storage hostnames in /etc/hosts lineinfile: dest="/etc/hosts" line="{{ ip }} {{ fqdn }} {{ hostname }}" regexp="{{ fqdn }}" state="present" when: - hostvars[item]['ands_facts_configured'] is defined vars: ip: "{{ hostvars[item]['ands_storage_ip'] }}" hostname: "{{ hostvars[item]['ands_hostname_storage'] }}" fqdn: "{{ hostvars[item]['ands_hostname_storage'] ~ ands_inner_dot_domain }}" with_inventory_hostnames: - nodes - new_nodes - name: Configure all public hostnames in /etc/hosts lineinfile: dest="/etc/hosts" line="{{ ip }} {{ fqdn }} {{ hostname }}" regexp="{{ fqdn }}" state="present" when: - hostvars[item]['ands_facts_configured'] is defined vars: ip: "{{ hostvars[item]['ands_openshift_public_ip'] }}" hostname: "{{ hostvars[item]['ands_hostname_public'] }}" fqdn: "{{ hostvars[item]['ands_hostname_public'] ~ ands_inner_dot_domain }}" with_inventory_hostnames: - nodes - new_nodes