Skip to content

Commit

Permalink
Add ability to have src_check_script and check_script with parameters
Browse files Browse the repository at this point in the history
If we just use "check_script" and "src_check_script",
the file from the source will be copy, to the target,
and take the name set on "check_script". This could be
an issue if we have parameters under "check_script".
For example, if we have something like:
check_script: "/etc/keepalived/pingable_check.sh
{{ keepalived_ping_count }} {{ keepalived_ping_address }}"

We could end up with a file name:
"/etc/keepalived/pingable_check.sh 1 203.0.113.89"

We should for that have an optional field for setting
the destination without taking the parameters,
like dest_check_script.
  • Loading branch information
Dazul committed Feb 19, 2019
1 parent 94d8797 commit 6899628
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tasks/main.yml
Expand Up @@ -77,7 +77,7 @@
- name: Dropping the tracking scripts
copy:
src: "{{ item.value.src_check_script }}"
dest: "{{ item.value.check_script }}"
dest: "{{ item.value.dest_check_script|default(item.value.check_script) }}"
mode: "0755"
with_dict: "{{ keepalived_scripts | default('{}') }}"
when: item.value.src_check_script is defined
Expand Down

0 comments on commit 6899628

Please sign in to comment.