summaryrefslogtreecommitdiffstats
path: root/ansible_collections/inspur/sm/playbooks/modules/examples-edit_alert_policy.yml
blob: a232000035e4d8bfd98675879cadef7d1cbe196e (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
- name: alert policy test
  hosts: ism
  connection: local
  gather_facts: no
  vars:
    ism:
      host: "{{ ansible_ssh_host }}"
      username: "{{ username }}"
      password: "{{ password }}"

  tasks:

  - name: "set alert policy"
    inspur.sm.edit_alert_policy:
      id: 1
      status: "enable"
      type: "snmp"
      destination: "100.2.2.2"
      channel: "shared"
      provider: "{{ ism }}"

  - name: "set alert policy"
    inspur.sm.edit_alert_policy:
      id: 1
      status: "disable"
      provider: "{{ ism }}"