Debian Codegraph @

ansible_collections/cisco/ucs/playbooks/ucs_disk_group_policy.yml

raw symbols SCIP
1 ---
2 # Example Playbook: cisco.ucs.ucs_disk_group_policy
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 Disk Group Policy
30 cisco.ucs.ucs_disk_group_policy:
31 <<: *login_info
32 name: DEE-DG
33 raid_level: mirror
34 configuration_mode: manual
35 manual_disks:
36 - slot_num: '1'
37 role: normal
38 - slot_num: '2'
39 role: normal
40 org_dn: org-root/org-level1
41 delegate_to: localhost
42
43 - name: Remove Disk from Policy
44 cisco.ucs.ucs_disk_group_policy:
45 <<: *login_info
46 name: DEE-DG
47 description: Testing Ansible
48 raid_level: stripe
49 configuration_mode: manual
50 manual_disks:
51 - slot_num: '1'
52 role: normal
53 - slot_num: '2'
54 role: normal
55 state: absent
56 virtual_drive:
57 access_policy: platform-default
58 io_policy: direct
59 strip_size: 64KB
60 org_dn: org-root/org-level1
61 delegate_to: localhost
62
63 - name: Remove Disk Group Policy
64 cisco.ucs.ucs_disk_group_policy:
65 <<: *login_info
66 name: DEE-DG
67 state: absent
68 org_dn: org-root/org-level1
69 delegate_to: localhost
70
71 - name: Remove UCS Organization
72 cisco.ucs.ucs_org:
73 <<: *login_info
74 org_name: level1
75 parent_org_path: root
76 state: absent
77 delegate_to: localhost