Debian Codegraph @

ansible_collections/cisco/ucs/playbooks/ucs_storage_profile.yml

raw symbols SCIP
1 ---
2 # Example Playbook: cisco.ucs.ucs_storage_profile
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 Storage Profile
30 cisco.ucs.ucs_storage_profile:
31 <<: *login_info
32 name: DEE-StgProf
33 org_dn: org-root/org-level1
34 local_luns:
35 - name: Boot-LUN
36 size: '60'
37 disk_policy_name: DEE-DG
38 - name: Data-LUN
39 size: '200'
40 disk_policy_name: DEE-DG
41 delegate_to: localhost
42
43 - name: Remove Local LUN from Storage Profile
44 cisco.ucs.ucs_storage_profile:
45 <<: *login_info
46 name: DEE-StgProf
47 org_dn: org-root/org-level1
48 local_luns:
49 - name: Data-LUN
50 state: absent
51 delegate_to: localhost
52
53 - name: Remove Storage Profile
54 cisco.ucs.ucs_storage_profile:
55 <<: *login_info
56 name: DEE-StgProf
57 org_dn: org-root/org-level1
58 state: absent
59 delegate_to: localhost
60
61 - name: Remove UCS Organization
62 cisco.ucs.ucs_org:
63 <<: *login_info
64 org_name: level1
65 parent_org_path: root
66 state: absent
67 delegate_to: localhost