--- - name: Install podman packages ansible.builtin.package: name: - podman - podman-compose - crun state: present - name: Enable Podman service ansible.builtin.systemd: name: podman.service enabled: true - name: Create projects directory ansible.builtin.file: path: "{{ podman_projects_dir }}" state: directory owner: "{{ ansible_user }}" group: "{{ ansible_user }}" mode: "0755" - name: Deploy registries configuration ansible.builtin.template: src: registries.conf.j2 dest: /etc/containers/registries.conf owner: root group: root mode: "0644" - name: Deploy Podman containers configuration ansible.builtin.template: src: containers.conf.j2 dest: /etc/containers/containers.conf owner: root group: root mode: "0644" - name: Create external Podman networks containers.podman.podman_network: name: "{{ item.name }}" subnet: "{{ item.subnet }}" gateway: "{{ item.gateway }}" state: present loop: "{{ podman_external_networks | default([]) }}" when: podman_external_networks is defined and podman_external_networks | length > 0