Debian Codegraph @

ansible_collections/cisco/ucs/playbooks/ucs_san_connectivity.yml

raw symbols SCIP
1 ---
2 # Example Playbook: cisco.ucs.ucs_san_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 SAN Connectivity Policy
30 cisco.ucs.ucs_san_connectivity:
31 <<: *login_info
32 name: Cntr-FC-Boot
33 description: FC Boot Policy
34 org_dn: org-root/org-level1
35 wwnn_pool: WWNN-Pool
36 vhba_list:
37 - name: Fabric-A
38 vhba_template: vHBA-Template-A
39 adapter_policy: Linux
40 - name: Fabric-B
41 vhba_template: vHBA-Template-B
42 adapter_policy: Linux
43 delegate_to: localhost
44
45 - name: Remove SAN Connectivity Policy
46 cisco.ucs.ucs_san_connectivity:
47 <<: *login_info
48 name: Cntr-FC-Boot
49 org_dn: org-root/org-level1
50 state: absent
51 delegate_to: localhost
52
53 - name: Remove UCS Organization
54 cisco.ucs.ucs_org:
55 <<: *login_info
56 org_name: level1
57 parent_org_path: root
58 state: absent
59 delegate_to: localhost