Skip to content

Instantly share code, notes, and snippets.

@ujwalkomarla
Created August 26, 2019 22:16
Show Gist options
  • Save ujwalkomarla/8b65f6ca63de97e750e7ef69fb12c9bd to your computer and use it in GitHub Desktop.
Save ujwalkomarla/8b65f6ca63de97e750e7ef69fb12c9bd to your computer and use it in GitHub Desktop.
Ansible RESTCONF PUT
REST_SW1 ansible_host=10.68.5.65 ansible_network_os=restconf ansible_connection=httpapi ansible_user=admin ansible_ssh_pass= ansible_httpapi_restconf_root='/rest/restconf/data'
---
- name: Test PUT
hosts: REST_SW1
gather_facts: false
tasks:
- name: LLDP config PUT operation
restconf_config:
path: openconfig-lldp:lldp/config
method: put
content: |
{
"openconfig-lldp:config": {
"suppress-tlv-advertisement": [
"SYSTEM_CAPABILITIES",
"PORT_DESCRIPTION",
"MANAGEMENT_ADDRESS"],
"hello-timer": 30}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment