From 0042aa91dd678fe0e8600f79a43575596550c249 Mon Sep 17 00:00:00 2001 From: Mike Holloway Date: Thu, 26 Dec 2024 21:21:29 -0500 Subject: [PATCH] containers.conf - no_hosts=true --- files/containers.conf | 2 ++ tasks/main.yml | 13 +++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 files/containers.conf diff --git a/files/containers.conf b/files/containers.conf new file mode 100644 index 0000000..b4c78be --- /dev/null +++ b/files/containers.conf @@ -0,0 +1,2 @@ +[containers] +no_hosts=true diff --git a/tasks/main.yml b/tasks/main.yml index bd134d5..d0fc4f4 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -32,6 +32,19 @@ - name: Generate podman shell completion scripts for bash command: "podman completion bash" +- name: Disable hosts files for containers by default + file: + path: "/home/{{ service_users[0] }}/.config/containers/" + state: directory + become: yes + become_user: "{{ service_users[0] }}" + +- copy: + src: containers.conf + dest: "/home/{{ service_users[0] }}/.config/containers/containers.conf" + become: yes + become_user: "{{ service_users[0] }}" + - name: Enable podman.socket for {{ service_users[0] }} systemd: name: podman.socket