diff --git a/tasks/main.yml b/tasks/main.yml index a6575f0..aa71b5a 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -26,6 +26,23 @@ selinux_permissive: name: container_t permissive: true + +- name: Add hosts file entry for hostname + lineinfile: + path: /etc/hosts + regexp: '^127\.0\.0\.1' + line: "127.0.0.1 {{ inventory_hostname }} localhost localhost.localdomain localhost4 localhost4.localdomain4" + owner: root + group: root + mode: 0644 + +- lineinfile: + path: /etc/hosts + regexp: '^::1' + line: "::1 {{ inventory_hostname }} localhost localhost.localdomain localhost6 localhost6.localdomain6" + owner: root + group: root + mode: 0644 # - name: Copy cni networking driver config into place # blockinfile: # name: "/etc/cni/net.d/podman.conflist"