diff --git a/osism/commands/noset.py b/osism/commands/noset.py index bb9f5495..9901efa7 100644 --- a/osism/commands/noset.py +++ b/osism/commands/noset.py @@ -1,6 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 from cliff.command import Command +from loguru import logger from osism.tasks import ansible @@ -19,14 +20,16 @@ def get_parser(self, prog_name): def take_action(self, parsed_args): host = parsed_args.host[0] + logger.info(f"Set no maintenance state on host {host}") + arguments = [ "-e status=False", "-l {host}", ] ansible.run.delay( - "state", - "maintenance", + "generic", + "state-maintenance", arguments, publish=False, locking=False, diff --git a/osism/commands/set.py b/osism/commands/set.py index 2d76488a..67d4fb2b 100644 --- a/osism/commands/set.py +++ b/osism/commands/set.py @@ -1,6 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 from cliff.command import Command +from loguru import logger from osism.tasks import ansible @@ -19,14 +20,16 @@ def get_parser(self, prog_name): def take_action(self, parsed_args): host = parsed_args.host[0] + logger.info(f"Set maintenance state on host {host}") + arguments = [ "-e status=True", "-l {host}", ] ansible.run.delay( - "state", - "maintenance", + "generic", + "state-maintenance", arguments, publish=False, locking=False,