Read this in other languages:
English,日本語, Française, Español.
This workshop is designed to provide a practical understanding of how to manage inventories and credentials within the Ansible Automation Controller. You'll learn how to navigate a preloaded inventory, understand its structure, and explore the setup and use of machine credentials for accessing managed hosts.
- Introduction to Inventories
- Exploring the 'Workshop Inventory'
- Understanding Machine Credentials
- Additional Credential Types
- Conclusion
Inventories in the Ansible Automation Controller are crucial for defining and organizing the hosts your playbooks will run against. They can be static, with a fixed list of hosts, or dynamic, pulling host lists from external sources.
The 'Workshop Inventory' is preloaded into your lab environment, representing a typical static inventory:
- Accessing the Inventory: Navigate to
Resources → Inventories
in the web UI, and select 'Workshop Inventory'. - Viewing Hosts: Click the 'Hosts' button to reveal the preloaded host configurations, similar to what you might find in a traditional Ansible inventory file, such as:
[web_servers]
web1 ansible_host=22.33.44.55
web2 ansible_host=33.44.55.66
...
Machine credentials are essential for establishing SSH connections to your managed hosts:
- Accessing Credentials: From the main menu, choose
Resources → Credentials
and select 'Workshop Credential'. - Credential Details: The 'Workshop Credential' is pre-set with parameters like:
- Credential Type: Machine, for SSH access.
- Username: A predefined user, e.g.,
ec2-user
. - SSH Private Key: Encrypted, providing secure access to your hosts.
The Ansible Automation Controller supports various credential types for different automation scenarios:
- Network Credentials: For managing network devices.
- Source Control Credentials:* For source control management access.
- Amazon Web Services Credentials: For integration with Amazon AWS.
Each type is tailored to specific requirements, enhancing your automation's flexibility and security.
This workshop introduces the foundational concepts of inventories and credentials within the Ansible Automation Controller. Understanding these components is crucial for efficiently managing your automation tasks and securing access to your infrastructure.
Navigation
Previous Exercise - Next Exercise
Click here to return to the Ansible for Red Hat Enterprise Linux Workshop