A Juniper Ansible fact-gathering playbook that sets connection: local and gather_facts: no, invokes the Juniper.junos role's juniper_junos_facts module, and is paired with an inventory file supplying ansible_user and ansible_password for every managed device has everything required to run: local connection avoids requiring a native SSH shell on the Junos device, disabling the default fact-gathering avoids incompatibility with non-Linux network OS hosts, and the per-host credentials satisfy the module's authentication requirements. With valid YAML and complete host/credential data, the play executes successfully.
Community Discussion