summaryrefslogtreecommitdiffstats
path: root/ansible_collections/inspur/sm/playbooks/modules/examples-edit_power_budget.yml
blob: 5453f560280070c68a21eab4f0b81cbb45c0922a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
- name: Power budget test
  hosts: ism
  connection: local
  gather_facts: no
  vars:
    ism:
      host: "{{ ansible_ssh_host }}"
      username: "{{ username }}"
      password: "{{ password }}"

  tasks:

  - name: "Get power budget range"
    inspur.sm.edit_power_budget:
      range: True
      provider: "{{ ism }}"

  - name: "add power budget"
    inspur.sm.edit_power_budget:
      action: "add"
      id: 1
      watts: 1500
      start1: 2
      end1: 5
      week1:
        - Mon
        - Wed
        - Fri
      provider: "{{ ism }}"

  - name: "Set power budget status to open"
    inspur.sm.edit_power_budget:
      action: "open"
      id: 1
      provider: "{{ ism }}"

  - name: "Set power budget status to close"
    inspur.sm.edit_power_budget:
      action: "close"
      id: 1
      provider: "{{ ism }}"

  - name: "Delete power budget"
    inspur.sm.edit_power_budget:
      action: "delete"
      id: 1
      provider: "{{ ism }}"