Debian Codegraph @

ansible_collections/cisco/ucs/playbooks/ucs_wwn_pool.yml

raw symbols SCIP
1 ---
2 # Example Playbook: cisco.ucs.ucs_wwn_pool
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 WWNN pool
30 cisco.ucs.ucs_wwn_pool:
31 <<: *login_info
32 name: WWNN-Pool
33 org_dn: org-root/org-level1
34 purpose: node
35 first_addr: 20:00:00:25:B5:48:00:00
36 last_addr: 20:00:00:25:B5:48:00:0F
37 delegate_to: localhost
38
39 - name: Configure WWPN A pool
40 cisco.ucs.ucs_wwn_pool:
41 <<: *login_info
42 name: WWPN-Pool-A
43 org_dn: org-root/org-level1
44 purpose: port
45 order: sequential
46 first_addr: 20:00:00:25:B5:48:0A:00
47 last_addr: 20:00:00:25:B5:48:0A:0F
48 delegate_to: localhost
49
50 - name: Configure WWPN Bpool
51 cisco.ucs.ucs_wwn_pool:
52 <<: *login_info
53 name: WWPN-Pool-B
54 org_dn: org-root/org-level1
55 purpose: port
56 order: sequential
57 first_addr: 20:00:00:25:B5:48:0B:00
58 last_addr: 20:00:00:25:B5:48:0B:0F
59 delegate_to: localhost
60
61 - name: Remove WWNN pool
62 cisco.ucs.ucs_wwn_pool:
63 <<: *login_info
64 org_dn: org-root/org-level1
65 name: WWNN-Pool
66 state: absent
67 delegate_to: localhost
68
69 - name: Remove WWPN pool
70 cisco.ucs.ucs_wwn_pool:
71 <<: *login_info
72 name: WWPN-Pool-A
73 org_dn: org-root/org-level1
74 state: absent
75 delegate_to: localhost
76
77 - name: Remove WWPN pool
78 cisco.ucs.ucs_wwn_pool:
79 <<: *login_info
80 name: WWPN-Pool-B
81 org_dn: org-root/org-level1
82 state: absent
83 delegate_to: localhost
84
85 - name: Remove UCS Organization
86 cisco.ucs.ucs_org:
87 <<: *login_info
88 org_name: level1
89 parent_org_path: root
90 state: absent
91 delegate_to: localhost