From b5b06841d1c82d45863201cee520026cc1910dbc Mon Sep 17 00:00:00 2001 From: tomoto Date: Wed, 13 Jun 2018 16:47:18 +0200 Subject: [PATCH] Add check_mk tasks and roles --- .gitignore | 2 - roles/checkmk-agent/tasks/main.yml | 19 +++++++++ roles/checkmk-server/tasks/main.yml | 61 +++++++++++++++++++++++++++++ site.yml | 10 +++++ 4 files changed, 90 insertions(+), 2 deletions(-) create mode 100644 roles/checkmk-agent/tasks/main.yml create mode 100644 roles/checkmk-server/tasks/main.yml diff --git a/.gitignore b/.gitignore index 7e837ea..83cf9dd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,4 @@ .vault_pass site.retry -playbooks/*.retry -inventory/*.hosts ansible.log *.swp diff --git a/roles/checkmk-agent/tasks/main.yml b/roles/checkmk-agent/tasks/main.yml new file mode 100644 index 0000000..4c9f5ab --- /dev/null +++ b/roles/checkmk-agent/tasks/main.yml @@ -0,0 +1,19 @@ +--- + +- name: Download Check_MK Agent + get_url: + dest: /opt/check-mk-agent_1.4.0p33-1_all.deb + mode: 0755 + validate_certs: no + url: https://forseti.binary.kitchen/bk/check_mk/agents/check-mk-agent_1.4.0p33-1_all.deb + +- name: Install Check_MK Agent dependencies + apt: name={{ item }} + with_items: + - xinetd + +- name: Install Check_MK Agent + apt: + deb: "/opt/check-mk-agent_1.4.0p33-1_all.deb" + state: present + diff --git a/roles/checkmk-server/tasks/main.yml b/roles/checkmk-server/tasks/main.yml new file mode 100644 index 0000000..5a72947 --- /dev/null +++ b/roles/checkmk-server/tasks/main.yml @@ -0,0 +1,61 @@ +--- + +- name: Download Check_MK + get_url: + dest: /opt/check-mk-raw-1.4.0p33_0.stretch_amd64.deb + mode: 0755 + url: https://mathias-kettner.de/support/1.4.0p33/check-mk-raw-1.4.0p33_0.stretch_amd64.deb + +- name: Install Check_MK dependencies + apt: name={{ item }} + with_items: + - cron + - debconf + - time + - traceroute + - curl + - dialog + - dnsutils + - fping + - graphviz + - apache2 + - libdbi1 + - libevent-2.0-5 + - libgd3 + - libltdl7 + - libnet-snmp-perl + - libpango1.0-0 + - libperl5.24 + - libreadline7 + - libsnmp-perl + - libuuid1 + - patch + - binutils + - rpm + - php + - php-cgi + - php-cli + - php-gd + - php-mcrypt + - php-sqlite3 + - php-pear + - rsync + - smbclient + - rpcbind + - lcab + - snmp + - unzip + - xinetd + - libfreeradius3 + - libpcap0.8 + - libgsf-1-114 + - libglib2.0-0 + - poppler-utils + - libffi6 + - libssl1.0.2 + +- name: Install Check_MK + apt: + deb: "/opt/check-mk-raw-1.4.0p33_0.stretch_amd64.deb" + state: present + diff --git a/site.yml b/site.yml index 8200079..f1f0a0a 100644 --- a/site.yml +++ b/site.yml @@ -26,6 +26,16 @@ - librenms - racktables +- name: Setup Check_MK server + hosts: forseti.binary.kitchen + roles: + - checkmk-server + +- name: Install Check_MK Agent + hosts: forseti.binary.kitchen + roles: + - checkmk-agent + - name: Setup ldap server hosts: helium.binary-kitchen.net roles: