Debian Codegraph @

ansible_collections/cisco/ucs/playbooks/ucs_server_maintenance.yml

raw symbols SCIP
1 ---
2 # Example Playbook: cisco.ucs.ucs_server_maintenance
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 Server Maintenance Policy (check_mode)
21 cisco.ucs.ucs_server_maintenance:
22 <<: *login_info
23 name: user-ack
24 uptime_disr: user-ack
25 trigger_config: on-next-boot
26 delegate_to: localhost
27 check_mode: true
28
29 - name: Add Server Maintenance Policy
30 cisco.ucs.ucs_server_maintenance:
31 <<: *login_info
32 name: user-ack
33 uptime_disr: user-ack
34 trigger_config: on-next-boot
35 delegate_to: localhost
36
37 - name: Idempotent Add Server Maintenance Policy
38 cisco.ucs.ucs_server_maintenance:
39 <<: *login_info
40 name: user-ack
41 uptime_disr: user-ack
42 trigger_config: on-next-boot
43 delegate_to: localhost