I've run the ansible-navigator command using serveral of its subcommands
(e.g. config, images, inventory, settings, doc), and looking at the early output
of each command, I see something that suggest to me that an automation
execution environment is being run/executed - for each command (i.e.
$ ansible-navigator doc -l OR $ ansible-navigator settings OR .etc)
My question is, does an automation executioin environment get
launched/executed/run each time the ansible-navigator command is
executed?
@Trevor -
I was tired last night and replied from e-mail through a phone to your post. I have a new post that I'm referencing here that will give you a demo you can look at and answer your question way more completely than what I provided earlier in this post. It is also a great demo that you can use in your RHA courses too. I probably should tweak it a little and make it an Enable Sysadmin article - what do you think?
Travis -
Thanks for that confirmation.
Now, as a followup to the previous question, what exactly
is responsible for launching the automation execution
environment? Is it podman, docker, etc.? I feel fairly
certain that I have the answer on this, but not certain
enough to bet my lunch money for tomorrow.
Awesome! Awesome! Awesome!
If I were a just a little bit more brave, I could
have won a $1.50 had I bet my lunch money
As always, many thanks Travis!!!
When you run ansible-navigator and it decides to use an AEE, it calls upon either Podman or other tools (depending on your setup and configuration) to launch the container. This container includes the Ansible runtime and any dependencies needed for your automation task.
Steps:
- First, the container image for the AEE is either retrieved from a remote repository or built locally if it's not already available.
- The containerization tool then creates a new container from this image. This container serves as the isolated environment where your Ansible tasks will be executed.
- ansible-navigator runs your command within this container. This approach ensures that the command is executed in a controlled environment, regardless of the host system's configuration.
- After the command is executed, the output is relayed back to the user, and the container is typically stopped and removed, freeing up resources.
shashi01 -
Great commentary!!! Love it!!!
What prompted my query was the launching of an aee,
even when a playbook wasn't being run.
Confirming that an aee is launched everytime the
ansible-navigator command is executed, regardless
of the subcommand (e.g. config, doc, inventory, etc.),
was the golden nugget for me. Prior to that confirmation,
my knowledge was only at the point of an aee being
launched when a playbook is run -- $ ansible-navigator run
Well, thanks to the commentary provided by the
community, the needle has been advanced on my
knowledge and understanding of this tool.
Again, many thanks for your contribution!!!
To summarise what @Travis mentioned ( correct me if I am wrong ) :
AEE is typically a container that is based on a specific image and is launched by a container runtime, such as podman or docker ( based on one's configuration - if both are there I think then whichever it finds first will be the one ). Once the container runtime is started, it creates a new container for the automation execution environment. The container is then started and the ansible-navigator command is executed inside the container.
Thanks Chetan for adding some additional spice to
the explanation!!!
@Trevor -
I was tired last night and replied from e-mail through a phone to your post. I have a new post that I'm referencing here that will give you a demo you can look at and answer your question way more completely than what I provided earlier in this post. It is also a great demo that you can use in your RHA courses too. I probably should tweak it a little and make it an Enable Sysadmin article - what do you think?
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.