Skip to content

Commit

Permalink
fup to #24 #25 - patch checkmk agent script locally and make role mor…
Browse files Browse the repository at this point in the history
…e idempotent
  • Loading branch information
zerwes committed Mar 21, 2024
1 parent 4a7850a commit 536934f
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@
dest: "{{ _local_tmp }}/{{ checkmk_agent_name }}"
mode: "0600"

- name: apply patches
delegate_to: localhost
check_mode: false
run_once: true
ansible.posix.patch:
src: "{{ item }}"
dest: "{{ _local_tmp }}/{{ checkmk_agent_name }}"
remote_src: false
with_items: "{{ opn_check_mk_patches | default([]) }}"

- name: copy {{ checkmk_agent_name }} from {{ _local_tmp }}
ansible.builtin.copy:
src: "{{ _local_tmp }}/{{ checkmk_agent_name }}"
Expand All @@ -35,15 +45,6 @@
- opn_install_check_mk
- checkmk_hostname is not defined

- name: apply patches
ansible.posix.patch:
src: "{{ item }}"
dest: "{{ opn_check_mk_path }}"
remote_src: false
with_items: "{{ opn_check_mk_patches | default([]) }}"
when:
- opn_install_check_mk

- name: create lib dirs
ansible.builtin.file:
path: "{{ opn_check_mk_lib_dir }}/{{ item }}"
Expand Down

0 comments on commit 536934f

Please sign in to comment.