kso512 / install-check_mk-server Goto Github PK
View Code? Open in Web Editor NEWAnsible role to install Check_MK RAW Edition
License: GNU General Public License v2.0
Ansible role to install Check_MK RAW Edition
License: GNU General Public License v2.0
Hi!
I notice you that the URL for downlading rpm is changed.
You need to update defaults vars to new one:
install_check_mk_server_source_url: https://checkmk.com/support//{{ install_check_mk_server_version }}/{{ install_check_mk_server_source }}
Hello, I just found your role and having a play. It looks like when the omd site is created, default behavior is to echo the cmkadmin password. After installing with your role, I was able to get the password from the omd-create.log but not really ideal if I want to do further automation after the install role is finished.
In the log it says you can change the admin password by running 'htpasswd -m ~/etc/htpasswd cmkadmin' as the site user, perhaps a task that runs that with a var to change to a password you specify? Unfortunately it prompts you for the new password and confirmation so I am not sure how to do that. Do you have any ideas?
I took a minimal install of CentOS and tried to install.
It failed so I modified the playbook accordingly but I suspect this needs updating to include the 'if yum' logic
Needs 'epel-release' and 'perl-Net-SNMP'
$ cat playbooks/install-check_mk-server.yaml
I tried using this role against CentOS 8.0 with Ansible 2.9.2 and encountered the following issues:
For CentOS 8.0 the fact ansible_os_family
will have the value dnf
. Therefore the yum installation steps will be skipped.
My dirty fix was to override this fact to use yum
as preferred package manager. The proper fix would be to add dnf blocks to the tasks file.
The required package graphviz-gd
was not found during installation. CentOS 7 had it in Base repository, but it was moved to the PowerTools repo. We can enable this repo with yum config-manager.
After the installation was successful I was shown "OMD: Site Not Started" instead of the web interface. SELinux was enabled on my installation and it prevented the webserver from connecting to the CMK backend at port 5000. @kso512 warned us about SELinux.
We can resolve this with the command setsebool -P httpd_can_network_connect 1
or with Ansible, of course.
Package python-passlib
also isn't available in CentOS default repositories. I fixed this by replacing it with python3-passlib
in variable install_check_mk_server_prereqs
in tasks/CentOS.yaml
.
---
- hosts: satellites
pre_tasks:
- name: Apply EL8 fixes
when: ansible_os_family == "RedHat" and ansible_distribution_major_version >= 8
block:
- name: Use yum as preferred package manager
set_fact: ansible_pkg_mgr=yum
- name: Enable PowerTools repository
shell: |
dnf config-manager --set-enabled PowerTools
- name: Set httpd_can_network_connect flag on and keep it persistent across reboots
seboolean:
name: httpd_can_network_connect
state: yes
persistent: yes
roles:
- role: geerlingguy.repo-epel
- role: install-check_mk-server
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.