1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Reboot - Fix VMware ESXi not working by adding appropriate commands (#49637)

* Add commands for VMware ESXi

* Add changelog
This commit is contained in:
Sam Doran 2018-12-11 15:30:11 -05:00 committed by Brian Coca
parent 63279823a7
commit 7c8af3d684
2 changed files with 7 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- reboot - add appropriate commands to make the plugin work with VMware ESXi (https://github.com/ansible/ansible/issues/48425)

View file

@ -45,10 +45,12 @@ class ActionModule(ActionBase):
'macosx': 'who -b', 'macosx': 'who -b',
'solaris': 'who -b', 'solaris': 'who -b',
'sunos': 'who -b', 'sunos': 'who -b',
'vmkernel': 'grep booted /var/log/vmksummary.log | tail -n 1',
} }
SHUTDOWN_COMMANDS = { SHUTDOWN_COMMANDS = {
'alpine': 'reboot', 'alpine': 'reboot',
'vmkernel': 'reboot',
} }
SHUTDOWN_COMMAND_ARGS = { SHUTDOWN_COMMAND_ARGS = {
@ -59,10 +61,12 @@ class ActionModule(ActionBase):
'openbsd': '-r +{delay_min} "{message}"', 'openbsd': '-r +{delay_min} "{message}"',
'solaris': '-y -g {delay_sec} -i 6 "{message}"', 'solaris': '-y -g {delay_sec} -i 6 "{message}"',
'sunos': '-y -g {delay_sec} -i 6 "{message}"', 'sunos': '-y -g {delay_sec} -i 6 "{message}"',
'vmkernel': '-d {delay_sec}',
} }
TEST_COMMANDS = { TEST_COMMANDS = {
'solaris': 'who' 'solaris': 'who',
'vmkernel': 'who',
} }
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):