- name: Create VLAN via RESTCONF on csr1kv-1
hosts: localhost
tasks:
- name: RESTCONF VLAN 40
ansible.builtin.uri:
url: "https://192.0.2.11/restconf/data/Cisco-IOS-XE-native:native/vlan"
method: {{1}}
headers:
Accept: "application/yang-data+json"
Content-Type: {{2}}
Authorization: "Bearer {{3}}"
body_format: json
body:
Cisco-IOS-XE-native:vlan:
vlan-list:
- id: 40
name: "VLAN40"
validate_certs: no
Drag a snippet from the right into each blank box in the code.