Read this in other languages:
English, 日本語, Portugues do Brasil, Française, Español.
- Understand Lab Topology: Familiarize yourself with the lab environment and access methods.
- Master Workshop Exercises: Gain proficiency in navigating and executing workshop tasks.
- Embrace Challenge Labs: Learn to apply your knowledge in practical challenge scenarios.
This workshop's initial phase focuses on the command-line utilities of the Ansible Automation Platform, such as:
- ansible-navigator - a Text-based User Interface (TUI) for running and developing Ansible content.
- ansible-core - the base executable that provides the framework, language and functions that underpin the Ansible Automation Platform, including CLI tools like
ansible
,ansible-playbook
andansible-doc
. - Execution Environments - Pre-built container images with Red Hat supported collections.
- ansible-builder - automates the process of building Execution Environments. Not a primary focus in this workshop.
If you need more information on new Ansible Automation Platform components bookmark this landing page https://red.ht/AAP-20
You'll work in a pre-configured environment with the following hosts:
Role | Inventory name |
---|---|
Ansible Control Host | ansible-1 |
Managed Host 1 | node1 |
Managed Host 2 | node2 |
Managed Host 3 | node3 |
We recommend using Visual Studio Code for this workshop for its integrated file browser, syntax-highlighting editor, and in-browser terminal. Direct SSH access is also available. Check out this YouTube tutorial on accessing your workbench environment.
NOTE: There is a short YouTube video provided if you need additional clarity: Ansible Workshops - Accessing your workbench environment
- Connect to Visual Studio Code via the Workshop launch page.
- Enter the provided password to login.
- Open a terminal in Visual Studio Code:
- Navigate to the
rhel-workshop
directory on the Ansible control node terminal.
[student@ansible-1 ~]$ cd ~/rhel-workshop/
[student@ansible-1 rhel-workshop]$ pwd
/home/student/rhel-workshop
~
: shortcut for the home directory/home/student
cd
: command to change directoriespwd
: prints the current working directory's full path.
- Run
ansible-navigator images
to view configured Execution Environments. - Use the corresponding number to investigate an EE, e.g. pressing 2 to open
ee-supported-rhel8
$ ansible-navigator images
Note: The output you see might differ from the above output
Selecting 2
for Ansible version and collections
will show us all Ansible Collections installed on that particular EE, and the version of ansible-core
:
- View the contents of
~/.ansible-navigator.yml
using Visual Studio Code or thecat
command.
$ cat ~/.ansible-navigator.yml
---
ansible-navigator:
ansible:
inventory:
entries:
- /home/student/lab_inventory/hosts
execution-environment:
image: registry.redhat.io/ansible-automation-platform-20-early-access/ee-supported-rhel8:2.0.0
enabled: true
container-engine: podman
pull:
policy: missing
volume-mounts:
- src: "/etc/ansible/"
dest: "/etc/ansible/"
- Note the following parameters within the
ansible-navigator.yml
file:
inventories
: shows the location of the ansible inventory being usedexecution-environment
: where the default execution environment is set
For a full listing of every configurable knob checkout the documentation
Each chapter comes with a Challenge Lab. These tasks test your understanding and application of the learned concepts. Solutions are provided under a warning sign for reference.
Navigation
{% if page.url contains 'ansible_rhel_90' %}
Next Exercise
{% else %}
Next Exercise
{% endif %}
Click here to return to the Ansible for Red Hat Enterprise Linux Workshop