mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-04 21:24:24 -07:00
bug(cli_action): Add missing runner arguments
This commit is contained in:
parent
00b87134f8
commit
9db3f09be7
1 changed files with 12 additions and 11 deletions
|
@ -144,7 +144,7 @@ class PacemakerStonith(StateModuleHelper):
|
||||||
)
|
)
|
||||||
|
|
||||||
def __init_module__(self):
|
def __init_module__(self):
|
||||||
self.runner = pacemaker_runner(self.module, cli_action='stonith')
|
self.runner = pacemaker_runner(self.module)
|
||||||
self.vars.set('previous_value', self._get()['out'])
|
self.vars.set('previous_value', self._get()['out'])
|
||||||
self.vars.set('value', self.vars.previous_value, change=True, diff=True)
|
self.vars.set('value', self.vars.previous_value, change=True, diff=True)
|
||||||
|
|
||||||
|
@ -160,8 +160,8 @@ class PacemakerStonith(StateModuleHelper):
|
||||||
return process
|
return process
|
||||||
|
|
||||||
def _get(self):
|
def _get(self):
|
||||||
with self.runner('state name') as ctx:
|
with self.runner('cli_action state name') as ctx:
|
||||||
result = ctx.run(state='status')
|
result = ctx.run(cli_action='stonith', state='status')
|
||||||
return dict([('rc', result[0]),
|
return dict([('rc', result[0]),
|
||||||
('out', result[1] if result[1] != "" else None),
|
('out', result[1] if result[1] != "" else None),
|
||||||
('err', result[2])])
|
('err', result[2])])
|
||||||
|
@ -178,27 +178,28 @@ class PacemakerStonith(StateModuleHelper):
|
||||||
return modified_stonith_operations
|
return modified_stonith_operations
|
||||||
|
|
||||||
def state_absent(self):
|
def state_absent(self):
|
||||||
with self.runner('state name', output_process=self._process_command_output(True, "does not exist"), check_mode_skip=True) as ctx:
|
with self.runner('cli_action state name', output_process=self._process_command_output(True, "does not exist"), check_mode_skip=True) as ctx:
|
||||||
ctx.run()
|
ctx.run(cli_action='stonith')
|
||||||
|
|
||||||
def state_present(self):
|
def state_present(self):
|
||||||
with self.runner(
|
with self.runner(
|
||||||
'state name resource_type resource_option resource_operation resource_meta resource_argument agent_validation wait',
|
'cli_action state name resource_type resource_option resource_operation resource_meta resource_argument agent_validation wait',
|
||||||
output_process=self._process_command_output(True, "already exists"),
|
output_process=self._process_command_output(True, "already exists"),
|
||||||
check_mode_skip=True) as ctx:
|
check_mode_skip=True) as ctx:
|
||||||
ctx.run(resource_type=self.fmt_stonith_resource(),
|
ctx.run(cli_action='stonith',
|
||||||
|
resource_type=self.fmt_stonith_resource(),
|
||||||
resource_option=self.vars.stonith_options,
|
resource_option=self.vars.stonith_options,
|
||||||
resource_operation=self.fmt_stonith_operations(),
|
resource_operation=self.fmt_stonith_operations(),
|
||||||
resource_meta=self.vars.stonith_metas,
|
resource_meta=self.vars.stonith_metas,
|
||||||
resource_argument=self.vars.stonith_argument)
|
resource_argument=self.vars.stonith_argument)
|
||||||
|
|
||||||
def state_enabled(self):
|
def state_enabled(self):
|
||||||
with self.runner('state name', output_process=self._process_command_output(True, "Starting"), check_mode_skip=True) as ctx:
|
with self.runner('cli_action state name', output_process=self._process_command_output(True, "Starting"), check_mode_skip=True) as ctx:
|
||||||
ctx.run()
|
ctx.run(cli_action='stonith')
|
||||||
|
|
||||||
def state_disabled(self):
|
def state_disabled(self):
|
||||||
with self.runner('state name', output_process=self._process_command_output(True, "Stopped"), check_mode_skip=True) as ctx:
|
with self.runner('cli_action state name', output_process=self._process_command_output(True, "Stopped"), check_mode_skip=True) as ctx:
|
||||||
ctx.run()
|
ctx.run(cli_action='stonith')
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue