diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_hosts.py b/lib/ansible/modules/cloud/ovirt/ovirt_hosts.py index bb2dfcb4054..c66c6cf7d76 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_hosts.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_hosts.py @@ -129,6 +129,11 @@ options: action before executing upgrade action." default: True version_added: 2.4 + reboot_after_upgrade: + description: + - "If I(true) and C(state) is I(upgraded) reboot host after successful upgrade." + default: True + version_added: 2.6 extends_documentation_fragment: ovirt ''' @@ -412,6 +417,7 @@ def main(): activate=dict(default=True, type='bool'), iscsi=dict(default=None, type='dict'), check_upgrade=dict(default=True, type='bool'), + reboot_after_upgrade=dict(default=True, type='bool'), ) module = AnsibleModule( argument_spec=argument_spec, @@ -497,6 +503,7 @@ def main(): wait_condition=lambda h: h.status == result_state, post_action=lambda h: time.sleep(module.params['poll_interval']), fail_condition=hosts_module.failed_state_after_reinstall, + reboot=module.params['reboot_after_upgrade'], ) elif state == 'iscsidiscover': host_id = get_id_by_name(hosts_service, module.params['name'])