Junos Automation (Scripting)
Junos Automation (Scripting)

Juniper and Ansible

‎07-27-2018 09:34 AM



I need help with setting up Ansible for deleting the configuration from Juniper device. I have already set it up for creating new configuration in the device. But I am not able figure out how to format the data for deletion.


I tried sending commands in this format, but it's not working(Bad syntax).

delete security address-book global address test1
delete security address-book global address-set test-set 


fatal: [xxxxx]: FAILED! => {"changed": false, "msg": "Failure loading the configuraton: ConfigLoadError(severity: error, bad_element: delete, message: error: syntax error)"}

Anyone know how to resolve this? I am using a Jinja template to build the configuration.