---- name: Test junos_config module gather_facts: no connection: local
vars: cli: host: "{{ inventory_hostname }}"
tasks: - name: junos_config ACL test junos_config: provider: "{{ cli }}" backup: yes lines: - set firewall family inet filter ANSIBLE-TEST term ANSIBLE then accept - delete firewall family inet filter ANSIBLE-TEST - set firewall family inet filter ANSIBLE-TEST term TEST-TERM-1 from protocol udp - set firewall family inet filter ANSIBLE-TEST term TEST-TERM-1 then log - set firewall family inet filter ANSIBLE-TEST term TEST-TERM-1 then discard
[cns04.sea3:/glide/cns/ansible/playbook/deploy]$ ansible-playbook junos_config_test.yml --check --diff -i inventory --limit test
PLAY [Test junos_config module] ************************************************
TASK [junos_config ACL test] ***************************************************
[edit firewall family inet]
filter ISP-INBOUND { ... }
+ filter ANSIBLE-TEST {
+ term ANSIBLE {
+ then accept;
+ }
+ term TEST-TERM-1 {
+ from {
+ protocol udp;
+ }
+ then {
+ log;
+ discard;
+ }
+ }
+ }
changed: [router_name]
PLAY RECAP *********************************************************************
router_name : ok=1 changed=1 unreachable=0 failed=0
[cns04.sea3:/glide/cns/ansible/playbook/deploy]$