Debian Codegraph @

ansible_collections/dellemc/openmanage/playbooks/ome/powerstate/ome_powerstate.yml

raw symbols SCIP
1 ---
2 - name: Dell OpenManage Ansible - OME Power state operations.
3 hosts: ome
4 gather_facts: false
5
6 tasks:
7 - name: Power state operation based on device id.
8 dellemc.openmanage.ome_powerstate:
9 hostname: "{{ hostname }}"
10 username: "{{ username }}"
11 password: "{{ password }}"
12 ca_path: "/path/to/ca_cert.pem"
13 device_id: 11111
14 power_state: "off"
15 delegate_to: localhost
16
17 - name: Power state operation based on device service tag.
18 dellemc.openmanage.ome_powerstate:
19 hostname: "{{ hostname }}"
20 username: "{{ username }}"
21 password: "{{ password }}"
22 ca_path: "/path/to/ca_cert.pem"
23 device_service_tag: "KLBR111"
24 power_state: "on"
25 delegate_to: localhost
26
27 - name: Power state operation based on list of device ids.
28 dellemc.openmanage.ome_powerstate:
29 hostname: "{{ hostname }}"
30 username: "{{ username }}"
31 password: "{{ password }}"
32 ca_path: "/path/to/ca_cert.pem"
33 device_id: "{{ item.device_id }}"
34 power_state: "{{ item.state }}"
35 with_items:
36 - { "device_id": 11111, "state": "on" }
37 - { "device_id": 22222, "state": "off" }
38 delegate_to: localhost
39
40 - name: Power state operation based on list of device service tags.
41 dellemc.openmanage.ome_powerstate:
42 hostname: "{{ hostname }}"
43 username: "{{ username }}"
44 password: "{{ password }}"
45 ca_path: "/path/to/ca_cert.pem"
46 device_service_tag: "{{ item.service_tag }}"
47 power_state: "{{ item.state }}"
48 with_items:
49 - { "service_tag": "KLBR111", "state": "on" }
50 - { "service_tag": "KLBR222", "state": "off" }
51 delegate_to: localhost