-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path2.yml
More file actions
30 lines (26 loc) · 827 Bytes
/
2.yml
File metadata and controls
30 lines (26 loc) · 827 Bytes
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
---
- name: bind filter to subject of contract
hosts: test
gather_facts: no
connection: local
vars:
aci_login: &aci_login
hostname: '{{ ansible_host }}'
username: '{{ lookup("env", "ANSIBLE_NET_USERNAME") | default(ansible_user, true) }}'
password: '{{ lookup("env", "ANSIBLE_NET_PASSWORD") | default(ansible_password, true) }}'
validate_certs: no
tasks:
- name: Add a new filter to a tenant
aci_filter:
<<: *aci_login
tenant: "{{ tenant_name }}"
filter: '{{ filter_name }}'
state: present
- name: Bind filter to subject of contract
aci_contract_subject_to_filter:
<<: *aci_login
tenant: "{{ tenant_name }}"
contract: "{{ contract_name }}"
subject: "{{ subject_name }}"
filter: '{{ filter_name }}'
state: present