Skip to content

Commit

Permalink
implemented task to remove check_mk plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
zerwes committed Oct 11, 2023
1 parent 166aaf9 commit 324c7d5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ check_mk_plugins: {}
# deprecated list of all plugins to be downloaded and installed from main check_mk site
# check_mk_plugins: []

# plugins that should be removed
check_mk_plugins_remove: {}

# dict of all local plugins to be installed
# in the role we have included some plugins
# check_mk_local_plugins:
Expand Down
6 changes: 6 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,12 @@
mode: 0755
with_items: "{{ check_mk_plugins.values() | list | flatten }}"

- name: Remove check plugins
ansible.builtin.file:
path: "/usr/lib/check_mk_agent/plugins/{{ item }}"
state: absent
with_items: "{{ check_mk_plugins_remove.values() | list | flatten }}"

- name: Copy local check_mk cfg files
ansible.builtin.copy:
src: "{{ item }}"
Expand Down

0 comments on commit 324c7d5

Please sign in to comment.