cancel
Showing results for 
Search instead for 
Did you mean: 
Trevor
Starfighter Starfighter
Starfighter
  • 4,630 Views

ansible-navigator

Jump to solution

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 "Red Hat Evangelist" Chandler
Labels (1)
2 Solutions

Accepted Solutions
Travis
Moderator
Moderator
  • 3,957 Views
I could be either one. On RHEL it would be Podman on other systems it would
depend on which container runtime environment is installed and available.
This is also something that is able to be configured if both are present.
Travis Michette, RHCA XIII
https://rhtapps.redhat.com/verify?certId=111-134-086
SENIOR TECHNICAL INSTRUCTOR / CERTIFIED INSTRUCTOR AND EXAMINER
Red Hat Certification + Training

View solution in original post

Travis
Moderator
Moderator
  • 3,897 Views

@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?

https://learn.redhat.com/t5/Automation-Management-Ansible/AAP2-and-Ansible-Navigator-Execution-Envir... 

Travis Michette, RHCA XIII
https://rhtapps.redhat.com/verify?certId=111-134-086
SENIOR TECHNICAL INSTRUCTOR / CERTIFIED INSTRUCTOR AND EXAMINER
Red Hat Certification + Training

View solution in original post

10 Replies
Travis
Moderator
Moderator
  • 3,962 Views
Yes. That is what ansible-navigator does.
Travis Michette, RHCA XIII
https://rhtapps.redhat.com/verify?certId=111-134-086
SENIOR TECHNICAL INSTRUCTOR / CERTIFIED INSTRUCTOR AND EXAMINER
Red Hat Certification + Training
Trevor
Starfighter Starfighter
Starfighter
  • 3,957 Views

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.

 

Trevor "Red Hat Evangelist" Chandler
Travis
Moderator
Moderator
  • 3,958 Views
I could be either one. On RHEL it would be Podman on other systems it would
depend on which container runtime environment is installed and available.
This is also something that is able to be configured if both are present.
Travis Michette, RHCA XIII
https://rhtapps.redhat.com/verify?certId=111-134-086
SENIOR TECHNICAL INSTRUCTOR / CERTIFIED INSTRUCTOR AND EXAMINER
Red Hat Certification + Training
Trevor
Starfighter Starfighter
Starfighter
  • 3,944 Views

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!!!

Trevor "Red Hat Evangelist" Chandler
shashi01
Moderator
Moderator
  • 3,900 Views

@Trevor 

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.

Trevor
Starfighter Starfighter
Starfighter
  • 3,884 Views

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!!!

Trevor "Red Hat Evangelist" Chandler
Chetan_Tiwary_
Community Manager
Community Manager
  • 3,927 Views

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. 

Trevor
Starfighter Starfighter
Starfighter
  • 3,923 Views

Thanks Chetan for adding some additional spice to 
the explanation!!!

Trevor "Red Hat Evangelist" Chandler
Travis
Moderator
Moderator
  • 3,898 Views

@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?

https://learn.redhat.com/t5/Automation-Management-Ansible/AAP2-and-Ansible-Navigator-Execution-Envir... 

Travis Michette, RHCA XIII
https://rhtapps.redhat.com/verify?certId=111-134-086
SENIOR TECHNICAL INSTRUCTOR / CERTIFIED INSTRUCTOR AND EXAMINER
Red Hat Certification + Training
Join the discussion
You must log in to join this conversation.