Debian Codegraph @

ansible_collections/cisco/ucs/playbooks/ucs_service_profile_template.yml

raw symbols SCIP
1 ---
2 # Example Playbook: cisco.ucs.ucs_service_profile_template
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 Service Profile Template with LAN/SAN Connectivity and all other options defaulted
30 cisco.ucs.ucs_service_profile_template:
31 <<: *login_info
32 name: sp-template
33 org_dn: org-root/org-level1
34 template_type: updating-template
35 uuid_pool: UUID-Pool
36 storage_profile: DEE-StgProf
37 lan_connectivity_policy: Cntr-FC-Boot
38 iqn_pool: iSCSI-Boot-A
39 san_connectivity_policy: Cntr-FC-Boot
40 boot_policy: DEE-vMedia
41 maintenance_policy: default
42 server_pool: Container-Pool
43 host_firmware_package: 3.1.2b
44 bios_policy: Docker
45 delegate_to: localhost
46
47 - name: Remove Service Profile Template
48 cisco.ucs.ucs_service_profile_template:
49 <<: *login_info
50 name: sp-template
51 org_dn: org-root/org-level1
52 state: absent
53 delegate_to: localhost
54
55 - name: Remove UCS Organization
56 cisco.ucs.ucs_org:
57 <<: *login_info
58 org_name: level1
59 parent_org_path: root
60 state: absent
61 delegate_to: localhost