check-mk-agent: Don't setup own systemd service files master
authorAlexander Barton <alex@barton.de>
Wed, 24 Jul 2019 12:52:00 +0000 (14:52 +0200)
committerAlexander Barton <alex@barton.de>
Wed, 24 Jul 2019 12:52:00 +0000 (14:52 +0200)
Current check-mk-agent packages have a good configuration bundled
already, so no need to setup own variants any more.

roles/check-mk-agent/tasks/main.yml
roles/check-mk-agent/templates/check_mk.socket.j2 [deleted file]
roles/check-mk-agent/templates/check_mk@.service.j2 [deleted file]

index 65b2a06..950946c 100644 (file)
     name=check-mk-agent-logwatch
   when: "ansible_distribution_major_version|int >= 7 and ansible_distribution_major_version|int < 9"
 
-- name: test for systemd unit files
-  tags:
-    - check_mk
-    - monitoring
-    - packages
-    - systemd
-  stat: path=/etc/systemd/system/check_mk.socket
-  when: "ansible_distribution_major_version|int >= 8"
-  check_mode: no
-  register: check_mk_socket_unit
-
-- name: install systemd socket unit files
-  tags:
-    - check_mk
-    - packages
-    - systemd
-  template: >
-    dest=/etc/systemd/system/check_mk.socket
-    group=root
-    mode=0644
-    owner=root
-    src=check_mk.socket.j2
-  when: ansible_distribution_major_version|int >= 8 and not check_mk_socket_unit.stat.exists
-  notify:
-    - reload systemd daemon
-
-- name: install systemd service unit files
-  tags:
-    - check_mk
-    - packages
-    - systemd
-  template: >
-    dest=/etc/systemd/system/check_mk@.service
-    group=root
-    mode=0644
-    owner=root
-    src=check_mk@.service.j2
-  when: ansible_distribution_major_version|int >= 8 and check_mk_socket_unit.stat.exists
-  notify:
-    - reload systemd daemon
-
 - name: enable xinetd configuration
   tags:
     - check_mk
diff --git a/roles/check-mk-agent/templates/check_mk.socket.j2 b/roles/check-mk-agent/templates/check_mk.socket.j2
deleted file mode 100644 (file)
index ce724b3..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-# /etc/systemd/system/check_mk.socket
-# ---
-#  {{ ansible_managed }}
-# ---
-
-[Unit]
-Description=Check_MK Agent Socket
-
-[Socket]
-ListenStream=6556
-Accept=true
-
-[Install]
-WantedBy=sockets.target
diff --git a/roles/check-mk-agent/templates/check_mk@.service.j2 b/roles/check-mk-agent/templates/check_mk@.service.j2
deleted file mode 100644 (file)
index e739efd..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-# /etc/systemd/system/check_mk@.service
-# ---
-#  {{ ansible_managed }}
-# ---
-
-[Unit]
-Description=Check_MK
-
-[Service]
-ExecStart=/usr/bin/check_mk_agent
-
-User=root
-Group=root
-
-StandardInput=socket