--- - hosts: localhost connection: local 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"