3 Commits

Author SHA1 Message Date
08a725ed68 Use yum command direct 2020-11-27 00:07:33 +13:00
438962933f Linting fixes 2020-11-26 23:12:45 +13:00
61a0209ece Revert back to temp download 2020-11-26 15:37:47 +13:00
6 changed files with 27 additions and 15 deletions

View File

@@ -1,3 +1,5 @@
# .ansible-lint │
warn_list: # or 'skip_list' to silence them completely
- '106' # Role name {} does not match ``^[a-z][a-z0-9_]+$`` pattern
warn_list: [] # or 'skip_list' to silence them completely
skip_list:
- '403'
- '106'

View File

@@ -16,3 +16,8 @@
state: enabled
permanent: yes
immediate: yes
- name: remove agent
file:
path: /tmp/check-mk-agent.rpm
state: absent

0
lint Normal file
View File

View File

@@ -4,16 +4,16 @@
cmk-update-agent register -H $(hostname -s) --user {{ cmk_username }} \
--secret {{ cmk_secret }}
changed_when: false
notify: remove agent
rescue:
- name: Gather facts of packages
package_facts:
manager: "auto"
- name: Ensure check_mk_agent installed (again)
package:
name: "{{ cmk_rpm_agent }}{{ cmk_auth }}"
state: latest
disable_gpg_check: true
command: /usr/bin/yum install --nogpgcheck -y /tmp/check-mk-agent.rpm
args:
warn: no
notify:
- restart xinetd
- ensure firewall open
@@ -29,3 +29,4 @@
--secret {{ cmk_secret }}
changed_when: false
when: "'check-mk-agent' in ansible_facts.packages"
notify: remove agent

View File

@@ -12,11 +12,15 @@
- name: Install check-mk-agent
block:
- name: Download the agent from Server
get_url:
url: "{{ cmk_rpm_agent }}{{ cmk_auth }}"
dest: /tmp/check-mk-agent.rpm
- name: Ensure check_mk_agent installed
package:
name: "{{ cmk_rpm_agent }}{{ cmk_auth }}"
state: latest
disable_gpg_check: true
command: /usr/bin/yum install --nogpgcheck -y /tmp/check-mk-agent.rpm
args:
warn: no
notify:
- restart xinetd
- cmk fresh install