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 From: [email protected] <[email protected]> On Behalf Of [email protected] Sent: 26 July 2019 16:40 To: Ansible Project <[email protected]> Subject: Re: [ansible-project] Get VMWare Hypervisor Maintenance Mode state 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, [email protected]<mailto:[email protected]> 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: [email protected]<javascript:> <[email protected]<javascript:>> On Behalf Of [email protected]<javascript:> Sent: 26 July 2019 14:38 To: Ansible Project <[email protected]<javascript:>> 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 [email protected]<javascript:>. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/b3431c4f-4ce9-45f0-8cbc-2a7eea23dda3%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/b3431c4f-4ce9-45f0-8cbc-2a7eea23dda3%40googlegroups.com?utm_medium=email&utm_source=footer>. -- 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 [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/08d92798-cdf2-47a5-97b8-300a6016cb54%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/08d92798-cdf2-47a5-97b8-300a6016cb54%40googlegroups.com?utm_medium=email&utm_source=footer>. -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/0211a22a1b68409bb8649fc8d613df99%40bham.ac.uk.
