All of the JUNOS OS devices are placed within the hosts inventory file in a group called JUNOS-devices, using the INI-file style [group] syntax. This allows us to refer to the collective, rather than individual hosts, when we go to define actions and tasks.
Then we create a playbook, which is a set of task definitions. In our case, we have used one playbook that consists of two tasks, executed in sequence:
- JUNOS_facts: The module to extract basic platform and inventory information, including configuration.
- copy: An Ansible core module used to manipulate files.
The playbook defines the scope of the activities as JUNOS-devices. This could be a single host, a host group or a host pattern, but in our case it's a reference to ...