Added option force install/reinstall on RHEL

This commit is contained in:
2020-10-14 15:01:34 +13:00
parent 9d974bdf0c
commit 396d711be9
2 changed files with 7 additions and 2 deletions

View File

@@ -23,3 +23,8 @@ cmk_auth: "&_username={{ cmk_username }}&_secret={{ cmk_secret }}"
# This variable is used to detect whether this is a fresh install
# Is changed to true if check-mk-agent gets installed
cmk_fresh_install: false
# This variable if set to true will force installation to run regardless of whether
# CheckMK is already installed.
# Breaks idempotence but allows role to be used to force upgrade agents.
cmk_force_install: false

View File

@@ -29,6 +29,6 @@
file:
path: /tmp/check-mk-agent.rpm
state: absent
when: "'check-mk-agent' not in ansible_facts.packages"
when: "'check-mk-agent' not in ansible_facts.packages or cmk_force_install"
tags:
- check_mk_agent