Last active
March 28, 2019 15:25
-
-
Save ujwalkomarla/a45223b6478875da5caf5a9d4eef4ec8 to your computer and use it in GitHub Desktop.
Ansible Restconf POST Method Issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Test POST | |
hosts: REST_SW1 | |
gather_facts: false | |
tasks: | |
- name: Create VLAN | |
restconf_config: | |
path: openconfig-vlan:vlans | |
method: post | |
content: | | |
{ | |
"openconfig-vlan:vlan": [ | |
{ | |
"config": { | |
"name": "ansible_1500", | |
"status": "ACTIVE", | |
"tpid": "oc-vlan-types:TPID_0x8100", | |
"vlan-id": 1500 | |
} | |
} | |
] | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment