Deploy Apache HTTPD with Podman Using Ansible Playbook
By Luca Berton · Published 2024-01-01 · Category: installation
Automate Apache HTTPD deployment in a Podman container with Ansible. Manage Podman installation, image pulling, and container configuration.
How to Setup Apache Web Server in a Podman Container for RedHat-like systems with Ansible? I'm going to show you a live Playbook with some simple Ansible code. I'm Luca Berton and welcome to today's episode of Ansible Pilot.
Setup Apache Web Server in a Podman Container for RedHat-like systems • install packages => ansible.builtin.yum • pull image => containers.podman.podman_image • run container => containers.podman.podman_container
Today we're talking about how to Deploy a web server apache httpd in a Podman Container for RedHat-like Linux systems. The full process requires three steps that you could automate with different Ansible modules. Firstly you need to verify that podman and its dependency is successfully installed on the target system using the ansible.builtin.yum Ansible module. Secondly, you need to pull the image for the container hub registry using the containers.podman.podman_image Ansible module. Finally, you could run the webserver container setting the right port and settings using the containers.podman.podman_image Ansible module.
Links • containers.podman.podman_image • containers.podman.podman_container • httpd image
## Playbook
How to Setup Apache Web Server in a Podman Container for RedHat-like systems with Ansible Playbook.
code
execution
idempotency
before execution
after execution
!Apache Web Server in a Docker Container for RedHat-like systems
Conclusion
Now you know how to set up Apache Web Server in a Podman Container for RedHat-like systems with Ansible.
Related Articles • Ansible Docker Guide • Ansible Inventory Guide • Ansible Become Guide • Ansible AWS Guide
Category: installation
Watch the video: Deploy Apache HTTPD with Podman Using Ansible Playbook — Video Tutorial