diff options
| author | Colin Wilk <colin.wilk@tum.de> | 2023-05-26 23:51:14 +0200 |
|---|---|---|
| committer | Colin Wilk <colin.wilk@tum.de> | 2023-05-26 23:51:14 +0200 |
| commit | 86becf489d216cb6de226d544ca128696f41357e (patch) | |
| tree | 4d3c3bd9d56e7d0d9e20a7c38df2b6be5d8339c4 /handlers | |
| parent | 3ceba2777f69b452f4856f07b5f21a402cc1ac7b (diff) | |
| download | ansible-role-prometheus-target-86becf489d216cb6de226d544ca128696f41357e.tar.gz ansible-role-prometheus-target-86becf489d216cb6de226d544ca128696f41357e.zip | |
Move hook ansible module config into their own config object
Keep
* prometheus_target_handler_command_enabled
* prometheus_target_handler_command_become
* prometheus_target_handler_shell_enabled
* prometheus_target_handler_shell_become
to avoid being overwritten when specifying
prometheus_target_handler_command or prometheus_target_handler_shell
Signed-off-by: Colin Wilk <colin.wilk@tum.de>
Diffstat (limited to 'handlers')
| -rw-r--r-- | handlers/main.yml | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/handlers/main.yml b/handlers/main.yml index 4b1aebb..f1db087 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -1,28 +1,28 @@ --- - name: Run command hook # noqa inline-env-var ansible.builtin.command: - argv: '{{ prometheus_target_handler_command_argv | default(omit) }}' - chdir: '{{ prometheus_target_handler_command_chdir | default(omit) }}' - cmd: '{{ prometheus_target_handler_command_cmd | default(omit) }}' - creates: '{{ prometheus_target_handler_command_creates | default(omit) }}' - free_form: '{{ prometheus_target_handler_command_free_form | default(omit) }}' - removes: '{{ prometheus_target_handler_command_removes | default(omit) }}' - stdin: '{{ prometheus_target_handler_command_stdin | default(omit) }}' - stdin_add_newline: '{{ prometheus_target_handler_command_stdin_add_newline | default(omit) }}' + argv: '{{ prometheus_target_handler_command.argv | default(omit) }}' + chdir: '{{ prometheus_target_handler_command.chdir | default(omit) }}' + cmd: '{{ prometheus_target_handler_command.cmd | default(omit) }}' + creates: '{{ prometheus_target_handler_command.creates | default(omit) }}' + free_form: '{{ prometheus_target_handler_command.free_form | default(omit) }}' + removes: '{{ prometheus_target_handler_command.removes | default(omit) }}' + stdin: '{{ prometheus_target_handler_command.stdin | default(omit) }}' + stdin_add_newline: '{{ prometheus_target_handler_command.stdin_add_newline | default(omit) }}' become: '{{ prometheus_target_handler_command_become }}' delegate_to: '{{ prometheus_target_host }}' when: prometheus_target_handler_command_enabled - name: Run shell hook ansible.builtin.shell: - chdir: '{{ prometheus_target_handler_shell_chdir | default(omit) }}' - cmd: '{{ prometheus_target_handler_shell_cmd | default(omit) }}' - creates: '{{ prometheus_target_handler_shell_creates | default(omit) }}' - executable: '{{ prometheus_target_handler_shell_executable | default(omit) }}' - free_form: '{{ prometheus_target_handler_shell_free_form | default(omit) }}' - removes: '{{ prometheus_target_handler_shell_removes | default(omit) }}' - stdin: '{{ prometheus_target_handler_shell_stdin | default(omit) }}' - stdin_add_newline: '{{ prometheus_target_handler_shell_stdin_add_newline | default(omit) }}' + chdir: '{{ prometheus_target_handler_shell.chdir | default(omit) }}' + cmd: '{{ prometheus_target_handler_shell.cmd | default(omit) }}' + creates: '{{ prometheus_target_handler_shell.creates | default(omit) }}' + executable: '{{ prometheus_target_handler_shell.executable | default(omit) }}' + free_form: '{{ prometheus_target_handler_shell.free_form | default(omit) }}' + removes: '{{ prometheus_target_handler_shell.removes | default(omit) }}' + stdin: '{{ prometheus_target_handler_shell.stdin | default(omit) }}' + stdin_add_newline: '{{ prometheus_target_handler_shell.stdin_add_newline | default(omit) }}' become: '{{ prometheus_target_handler_shell_become }}' delegate_to: '{{ prometheus_target_host }}' when: prometheus_target_handler_shell_enabled |