From 1dac10e5c3e362d6eace6ddb7bd42c5de48b6b2d Mon Sep 17 00:00:00 2001 From: trogdor_the_burninator Date: Tue, 8 Jan 2019 18:12:30 -0500 Subject: [PATCH] Add AIX support to reboot module (#50353) * Add ability for reboot module to work for AIX * changelog for AIX reboot support --- changelogs/fragments/reboot-add-aix-support.yml | 2 ++ lib/ansible/plugins/action/reboot.py | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 changelogs/fragments/reboot-add-aix-support.yml diff --git a/changelogs/fragments/reboot-add-aix-support.yml b/changelogs/fragments/reboot-add-aix-support.yml new file mode 100644 index 00000000000..3cf18f66322 --- /dev/null +++ b/changelogs/fragments/reboot-add-aix-support.yml @@ -0,0 +1,2 @@ +bugfixes: + - reboot - add support for rebooting AIX (https://github.com/ansible/ansible/issues/49712) diff --git a/lib/ansible/plugins/action/reboot.py b/lib/ansible/plugins/action/reboot.py index 7c933808a0a..6fa27006298 100644 --- a/lib/ansible/plugins/action/reboot.py +++ b/lib/ansible/plugins/action/reboot.py @@ -46,6 +46,7 @@ class ActionModule(ActionBase): 'solaris': 'who -b', 'sunos': 'who -b', 'vmkernel': 'grep booted /var/log/vmksummary.log | tail -n 1', + 'aix': 'who -b', } SHUTDOWN_COMMANDS = { @@ -62,6 +63,7 @@ class ActionModule(ActionBase): 'solaris': '-y -g {delay_sec} -i 6 "{message}"', 'sunos': '-y -g {delay_sec} -i 6 "{message}"', 'vmkernel': '-d {delay_sec}', + 'aix': '-Fr', } TEST_COMMANDS = {