-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path3.schemas.yml
37 lines (33 loc) · 1.13 KB
/
3.schemas.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
---
- ansible.builtin.import_playbook: update.yml
- name : Schemas and Templates
gather_facts: false
hosts: all
vars:
- aci_login: &mso_login
hostname: "{{ ansible_host }}"
username: "{{ ansible_user }}"
password: "{{ ansible_password }}"
validate_certs: "{{ validate_certs }}"
tasks:
- name: Add a new template to a schema
cisco.mso.mso_schema_template:
<<: *mso_login
schema: "{{ item.name }}"
state: "{{ item.status if item.status is defined else omit }}"
template: "{{ item.template }}"
tenant: "{{ item.tenant }}"
template_type: "{{ item.template_type }}"
delegate_to: localhost
loop: "{{ schema }}"
when: schema is defined
- name: Add a site to a schema
cisco.mso.mso_schema_site:
<<: *mso_login
schema: "{{ item.schema_name }}"
template: "{{ item.template_name }}"
site: "{{ item.site_name }}"
state: "{{ item.status if item.status is defined else omit }}"
delegate_to: localhost
loop: "{{ template_site_association }}"
when: template_site_association is defined