You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
any idea how to disable/enable vcenter alarm for esxi host in ansible task?
Atul Nasir
unread,
Aug 19, 2023, 2:12:57 PM8/19/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
Ansible does not have a built-in module specifically designed to manage vCenter alarms for ESXi hosts. However, you can use the vmware_vm_vm_drs_rule module to work with DRS rules which are closely related to alarms.
--- - name: Disable vCenter alarm for ESXi host hosts: localhost gather_facts: no tasks: - name: Create DRS Rule to disable alarm community.vmware.vm_vm_drs_rule: hostname: "{{ vcenter_hostname }}" username: "{{ vcenter_username }}" password: "{{ vcenter_password }}" cluster_name: "{{ cluster_name }}" enabled: no # Set to yes to enable the rule, no to disable affinity_rule: False # Set to True if you're working with affinity rules drs_rule_name: "Disable Alarm Rule" affinity_rule_name: "Affinity Rule" enabled_rule_name: "Enabled Rule" disabled_rule_name: "Disabled Rule" state: "present"