Skip to content

Commit f415f52

Browse files
committed
Possible to configure basic /etc/hosts (local node) if no proper name resolution
1 parent b9460ba commit f415f52

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

orahost/tasks/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
- selinux
2121
ignore_errors: true
2222

23+
- name: Add local node's ip & hostname to /etc/hosts
24+
lineinfile: dest=/etc/hosts line="{{ ansible_default_ipv4.address }} {{ ansible_fqdn }} {{ ansible_hostname }} " state=present
25+
when: configure_etc_hosts and ansible_default_ipv4.address is defined
2326

2427
- name: User | Add group(s)
2528
group: name={{ item.group }} gid={{ item.gid }} state=present

0 commit comments

Comments
 (0)