How to use execution environments
Ansible Navigator allows an execution environment to be run from the command line. The following demo.yml
playbook is available in the ch01
folder:
//demo.yml
---
- name: Demo Playbook
hosts: localhost
gather_facts: false
tasks:
- debug:
msg: Hello world
...
To run this playbook in an EE, use the ansible-navigator run demo.yml -m stdout
command. It should output a Hello world
message. Using the –ee
or –eei
option, the EE can be specified. This allows the user to use the same EE that was used in the controller for testing and development:
Figure 8.3 – ansible-navigator demo playbook
Inside the Automation controller, all jobs are run in an EE. When a playbook runs, a project or inventory...