Debian Codegraph @

ansible_collections/cisco/ucs/playbooks/ucs_lan_connectivity.yml

raw symbols SCIP
1 ---
2 # Example Playbook: cisco.ucs.ucs_lan_connectivity
3 - hosts: ucs
4 connection: local
5 gather_facts: false
6
7 tasks:
8 - name: Test that we have a UCS hostname, UCS username, and UCS password
9 fail:
10 msg: 'Please define the following variables: ucs_hostname, ucs_username and ucs_password.'
11 when: ucs_hostname is not defined or ucs_username is not defined or ucs_password is not defined
12 vars:
13 # use "<<: *login_info" to substite the information below in each task
14 # this is not required, however it makes the playbook shorter.
15 login_info: &login_info
16 hostname: "{{ ucs_hostname }}"
17 username: "{{ ucs_username }}"
18 password: "{{ ucs_password }}"
19
20 - name: Add UCS Organization
21 cisco.ucs.ucs_org:
22 <<: *login_info
23 org_name: level1
24 parent_org_path: root
25 description: level1 org
26 state: present
27 delegate_to: localhost
28
29 - name: Configure LAN Connectivity Policy
30 cisco.ucs.ucs_lan_connectivity:
31 <<: *login_info
32 name: Cntr-FC-Boot
33 org_dn: org-root/org-level1
34 vnic_list:
35 - name: eno1
36 vnic_template: Cntr-Template
37 adapter_policy: Linux
38 - name: eno2
39 vnic_template: Container-NFS-A
40 adapter_policy: Linux
41 - name: eno3
42 vnic_template: Container-NFS-B
43 adapter_policy: Linux
44 iscsi_vnic_list:
45 - name: iSCSIa
46 overlay_vnic: eno1
47 iscsi_adapter_policy: default
48 vlan_name: Container-MGMT-VLAN
49 - name: iSCSIb
50 overlay_vnic: eno3
51 iscsi_adapter_policy: default
52 vlan_name: Container-TNT-A-NFS
53 delegate_to: localhost
54
55 - name: Remove LAN Connectivity Policy
56 cisco.ucs.ucs_lan_connectivity:
57 <<: *login_info
58 name: Cntr-FC-Boot
59 org_dn: org-root/org-level1
60 state: absent
61 delegate_to: localhost
62
63 - name: Remove UCS Organization
64 cisco.ucs.ucs_org:
65 <<: *login_info
66 org_name: level1
67 parent_org_path: root
68 state: absent
69 delegate_to: localhost