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