--- - hosts: localhost connection: local collections: - containers.podman tasks: - name: install podman ansible.builtin.dnf: name: '@container-tools:ol8' state: present become: yes - name: pull oraclelinux:8 from GitHub containers.podman.podman_image: name: ghcr.io/oracle/oraclelinux:8 - name: ensure dest directory exists ansible.builtin.file: path: "/home/oracle/nginx/" state: directory - name: create empty file ansible.builtin.file: path: "/home/oracle/nginx/index.html" state: touch mode: '0755' - name: create index.html ansible.builtin.copy: dest: "/home/oracle/nginx/index.html" content: | Hello! Welcome to Oracle Linux Containers. - name: run image containers.podman.podman_container: name: my-ol8 image: ghcr.io/oracle/oraclelinux8-nginx:1.18 state: started detach: yes expose: - '80' - '443' publish: - '8080:80' volume: "/home/oracle/nginx:/usr/share/nginx/html:Z"