- So Docker is kind of old school according to Red Hat.
Red Hat has their own stack,
that's podman for running containers.
Let's talk podman.
So what is there to know?
Well, podman is the Red Hat Enterprise Linux eight
and later native way to run containers.
You'll find it on Red Hat, on Fedora, on CentOS,
on Rocky, on all the Red Hat related distributions
and even on other distributions it's finding its way.
To start podman containers,
you need to ensure that a podman software is installed
and in podman there is no need to run any daemon
to start podman containers. They call it native support.
Also, podman can do this thing that we call
our rootless containers and rootless containers
do not require any root privileges
but can run with ordinary user credentials.
Isn't that cool? Let's go check it out.
So the podman containers are in Putman dot YAML.
And what do we see?
We see that, oh,
apparently this is based on containers.
Do pop man.
So we need Ansible galaxy in salt containers dot pop, man.
It's kind of curious
but SBO galaxy salt doesn't work really well
from a playbook.
So let me do that
and let me do that right now.
Now let's get back.
I also need to tweak my inventory because I
know the inventory does not have my Rocky machines.
So I am going to use Rocky
for Ansible one as well as Ansible two.
Right now, let's get back to this pop man.
Yamo so host Rocky, the collections, I'm calling
the collections so that we can use short, short names.
After that, the task I'm installing pop man using packets
that's straightforward, nothing, nothing very complicated
about it.
Then I'm pulling an image, not because it is needed
but just because I wanted to show you pop an image
which allows you to pull an image, then I'm copying a file
into home.
So the content, the content is hello, and the destination
is TMP index HTML.
And then I'm creating an H CTP container with lots of surf.
So what do we do?
The name is test H C TPD.
The image is HTPD the data start detaches
through expose ports, 80 ports that is port forwarding.
So port 44, 44 on the local host, that is the Rocky
local host is going to forward to port 80 on the container.
And then we have the volumes where I'm doing a Mount
inside the container.
So you need to know what happens in a container in order
to understand stuff like this.
But this is a bind Mount that is presenting the contents
of TMP in user local, Apache to HT docs
with the results that the Apache server is going to
be able to serve some web server document route.
So this is going to work.
Let's check it out.
Ansible playbook on pop man Yamo
Oops minus K.
Apparently we need a pseudo password.
Well, let's give it to pseudo password.
So there we go.
We can see that it has been created.
So how we, how can we verify?
Well, Ansible on Ansible two minus a what?
Well pop man, PS that'll show
if there are any containers that are running and yay
we can see that there is indeed the container
that is running and curled to
Ansible
to colon 4, 4, 4, 4, instead giving access.
And oh no, that is giving an error message.
You don't have permission to access this resource.
Now that is something else.
And that might have to do with se Linux.
You know, the thing is that if you are running
if you're running se Linux on a system, that's security
enhanced Linux, and in the security enhanced Linux
you might have an issue with port forwarding.
You might also have an issue with bind mappings in volumes.
This is not the place to talk about SELinux considerations
for running pop man on, on Rocky.
That would be too specific for discourse.
So I consider this successful.
If you're not happy with it
I would say just remove the ports as well
as the volumes and you'll see that it's working anyways.
So that's all.