This commit is contained in:
38
config.yaml
38
config.yaml
@@ -1,8 +1,16 @@
|
|||||||
---
|
---
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
|
vars:
|
||||||
|
nid: L_671599294431642401 # TaintonNet
|
||||||
|
vlans:
|
||||||
|
- id: 1
|
||||||
|
name: Default
|
||||||
|
- id: 5
|
||||||
|
name: Native
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Get administered _identities _me
|
- name: Get Me
|
||||||
cisco.meraki.administered_identities_me_info:
|
cisco.meraki.administered_identities_me_info:
|
||||||
meraki_suppress_logging: true
|
meraki_suppress_logging: true
|
||||||
register: me
|
register: me
|
||||||
@@ -14,7 +22,31 @@
|
|||||||
- name: Get all Organizations
|
- name: Get all Organizations
|
||||||
cisco.meraki.organizations_info:
|
cisco.meraki.organizations_info:
|
||||||
meraki_suppress_logging: true
|
meraki_suppress_logging: true
|
||||||
register: result
|
register: organizations
|
||||||
|
|
||||||
- name: Show Organizations List
|
- name: Show Organizations List
|
||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
msg: "{{ result | json_query('meraki_response[*].name') }}"
|
msg: "{{ organizations | json_query('meraki_response[*].name') }}"
|
||||||
|
|
||||||
|
- name: Enable Vlans on the MX
|
||||||
|
cisco.meraki.networks_appliance_vlans_settings:
|
||||||
|
state: present
|
||||||
|
networkId: "{{ nid }}"
|
||||||
|
vlansEnabled: true
|
||||||
|
|
||||||
|
- name: Show VLANs
|
||||||
|
ansible.builtin.debug:
|
||||||
|
msg: "{{ vlans }}"
|
||||||
|
|
||||||
|
# - name: Create VLANs on MX
|
||||||
|
# cisco.meraki.networks_appliance_vlans:
|
||||||
|
# state: present
|
||||||
|
# applianceIp: "192.168.{{ item.id }}.1"
|
||||||
|
# # cidr: "192.168.{{ item.id }}.0/24"
|
||||||
|
# id: '{{ item.id }}'
|
||||||
|
# vlanId: {{ item.id }}
|
||||||
|
# name: {{ item.name }}
|
||||||
|
# networkId: "{{ nid }}"
|
||||||
|
# subnet: "192.168.{{ item.id }}.0/24"
|
||||||
|
# dnsNameservers: "9.9.9.9"
|
||||||
|
# loop: vlans
|
||||||
|
|||||||
Reference in New Issue
Block a user