Get VMWare Hypervisor Maintenance Mode state

11 views
Skip to first unread message

MKPhil

unread,
Jul 26, 2019, 9:38:28 AM7/26/19
to Ansible Project
I want to check if a VMWare Hypervisor (ESXi Host) is in Maintenance Mode or not.  I've been through the docs for the various vmware_* modules but I can't see any which will return this value.  Have I missed it or isn't this possible with Ansible?

P.Co...@bham.ac.uk

unread,
Jul 26, 2019, 10:19:17 AM7/26/19
to ansible...@googlegroups.com

How about utilising vmware_maintenancemode’s state parameter?

 

https://docs.ansible.com/ansible/latest/modules/vmware_maintenancemode_module.html#vmware-maintenancemode-module

 

 

Regards

Phil

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/b3431c4f-4ce9-45f0-8cbc-2a7eea23dda3%40googlegroups.com.

MKPhil

unread,
Jul 26, 2019, 11:40:21 AM7/26/19
to Ansible Project
Looked at this - it seems that is only puts a host in to maintenance mode - I don't think it will query the current state without making changes


On Friday, 26 July 2019 15:19:17 UTC+1, P.Co...@bham.ac.uk wrote:

How about utilising vmware_maintenancemode’s state parameter?

 

https://docs.ansible.com/ansible/latest/modules/vmware_maintenancemode_module.html#vmware-maintenancemode-module

 

 

Regards

Phil

 

From: ansible...@googlegroups.com <ansible...@googlegroups.com> On Behalf Of phil....@gmail.com
Sent: 26 July 2019 14:38
To: Ansible Project <ansible...@googlegroups.com>
Subject: [ansible-project] Get VMWare Hypervisor Maintenance Mode state

 

I want to check if a VMWare Hypervisor (ESXi Host) is in Maintenance Mode or not.  I've been through the docs for the various vmware_* modules but I can't see any which will return this value.  Have I missed it or isn't this possible with Ansible?

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.

To unsubscribe from this group and stop receiving emails from it, send an email to ansible...@googlegroups.com.

P.Co...@bham.ac.uk

unread,
Jul 29, 2019, 3:40:14 AM7/29/19
to ansible...@googlegroups.com

True, but you could use Check Mode (--check) to do a “dry-run” without actually making any changes though. Can’t help thinking there’s probably a better option, like you, but haven’t got time to look tbh.

 

Regards

Phil

To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/08d92798-cdf2-47a5-97b8-300a6016cb54%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages