mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00:00
pacemaker_resource: Add cloning support for resources and groups (#10665)
* add clone state for pacemaker_resource * add changelog fragment * Additional description entry for comment header * Apply suggestions from code review Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/pacemaker_resource.py Co-authored-by: Felix Fontein <felix@fontein.de> * fix formatting for yamllint * Apply code review suggestions * refactor state name to cloned * Update plugins/modules/pacemaker_resource.py Co-authored-by: Felix Fontein <felix@fontein.de> * Apply suggestions from code review Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * Apply suggestions from code review --------- Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
@@ -13,6 +13,7 @@ from ansible_collections.community.general.plugins.module_utils.cmd_runner impor
|
||||
_state_map = {
|
||||
"present": "create",
|
||||
"absent": "remove",
|
||||
"cloned": "clone",
|
||||
"status": "status",
|
||||
"enabled": "enable",
|
||||
"disabled": "disable",
|
||||
@@ -65,6 +66,8 @@ def pacemaker_runner(module, **kwargs):
|
||||
resource_operation=cmd_runner_fmt.as_func(fmt_resource_operation),
|
||||
resource_meta=cmd_runner_fmt.stack(cmd_runner_fmt.as_opt_val)("meta"),
|
||||
resource_argument=cmd_runner_fmt.as_func(fmt_resource_argument),
|
||||
resource_clone_ids=cmd_runner_fmt.as_list(),
|
||||
resource_clone_meta=cmd_runner_fmt.as_list(),
|
||||
apply_all=cmd_runner_fmt.as_bool("--all"),
|
||||
agent_validation=cmd_runner_fmt.as_bool("--agent-validation"),
|
||||
wait=cmd_runner_fmt.as_opt_eq_val("--wait"),
|
||||
|
||||
Reference in New Issue
Block a user