O'Reilly logo

JUNOS Automation Cookbook by Adam Chappell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How it works...

When Ansible reads the hosts inventory file, it determines the hosts and how they map to groups from the structure of the file. As we've seen, we can place hosts into groups by using the classic INI-file syntax. But for each group—and host-defined, Ansible also takes the time and trouble to look for files in the inventory directory that might assist with providing more information about the hosts.

Filename

Description

group_vars/group-name.yml

Group-wide variables that should be applied

host_vars/host-name.yml

Host-specific variables that should be applied

 

The YAML files contain key-value pairs to define variables that should be in-scope for any playbooks that work with the host or a host in the group. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required