dynamic inventories

This commit is contained in:
Ilgar_Naghiyev
2020-02-28 16:50:13 +01:00
parent 51703d125d
commit 4574701095
3 changed files with 27 additions and 2 deletions

View File

@@ -15,7 +15,7 @@ Red Hat Certified Specialist in Ansible Automation (EX407) Preparation Course
- [Inventory Essentials and Inventory Variables](#inventory-essentials-and-inventory-variables)
- [Demo: Variables and Inventories](#demo-variables-and-inventories)
- [Demo: Using YAML in Inventories](#demo-using-yaml-in-inventories)
- [Dynamic Inventories](#dynamic-inventories)
## Understanding Core Components of Ansible
### Understanding Core Components of Ansible Part 1
@@ -400,4 +400,29 @@ innaghiyev1c
opt_dir : /opt
```
### Demo: Using YAML in Inventories
### Demo: Using YAML in Inventories
Inventories may be specified in INI or YAML format. This demonstration goes over how to use YAML to create an inventory. Students will benefit from a refresher on YAML syntax as well as review key details on Ansible inventories.
This is how YAML inventory file looks like:
```
all:
hosts:
innaghiyev1c.mylabserver.com
children:
httpd:
hosts:
innaghiyev1c.mylabserver.com
innaghiyev3c.mylabserver.com
labservers:
hosts:
innaghiyev[1:3]c.mylabserver.com
```
### Dynamic Inventories
Being able to use dynamic inventories in essential skill for any Ansible specialist. This lecture goes over the details of how dynamic inventories in Ansible work.
![img](https://github.com/Bes0n/EX407-Ansible-Automation/blob/master/images/img9.png)
Some Popular Options:
![img](https://github.com/Bes0n/EX407-Ansible-Automation/blob/master/images/img10.png)

BIN
images/img10.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 KiB

BIN
images/img9.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 604 KiB