Hi everyone,
I am very new to Ansible and automation. i ma trying to run below playbook and getting related error.
---
- name: Generic
hosts: mx
roles:
- Juniper.junos
connection: local
gather_facts: no
vars_files:
- jun_snm.yml
tasks:
- name: SNMP
juniper_junos_config:
load: "set"
src: jun_snmp.j2
register: response
- name: "Print"
debug:
var: response.diff_lines
jun_snmp.j2
{% for snm in snmp_clients -%}
set snmp community r3adth1s clients {{ snm }}
{% endfor %}
jun_snm.yml
---
snmp_clients:
Below is error i am getting
fatal: [MX960_A]: FAILED! => {"changed": false, "msg": "Failure loading the configuraton: ConfigLoadError(severity: error, bad_element: {%, message: error: unknown command\nerror: invalid ip address or hostname: {{\nerror: unknown command)"}
Can you please advise.
Thanks