-
Notifications
You must be signed in to change notification settings - Fork 56
/
Copy pathremote-registration.yml
49 lines (48 loc) · 2.17 KB
/
remote-registration.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
---
# This playbook uses the inventory from the 'playbooks/hosts' file and expects
# an existing site with the below configuration and hosts of the group
# 'linux'.
- name: "Register hosts against a remote site. Both for updates and TLS."
hosts: linux
strategy: linear
vars:
# Basic server and authentication information.
# You have to provide the distributed setup yourself.
checkmk_agent_version: "2.3.0p14"
checkmk_agent_edition: "cre"
checkmk_agent_user: "cmkadmin"
checkmk_agent_pass: "password"
# Here comes the part, where we get into remote registration
checkmk_agent_server_protocol: http
# The following should be set to the central site.
# This where you configure the host objects.
# Currently the agent package is also pulled from here.
checkmk_agent_server: 192.168.56.1
checkmk_agent_site: "ansible"
# The following should be pointed to the respective remote site.
# This is where the registration will happen.
checkmk_agent_registration_server: "{{ checkmk_agent_server }}"
checkmk_agent_registration_site: ansible_remote_1
# The folder might differ from your remote site name,
# as it is the technical path. Check your configuration for this information.
checkmk_agent_folder: "/remote_1"
# These options need to be enabled for all registrations to work.
# You can however disable the one you do not want to perform.
# But the host needs to be added and changes activated in any case.
checkmk_agent_auto_activate: 'true'
checkmk_agent_update: 'true'
checkmk_agent_tls: 'true'
checkmk_agent_add_host: 'true'
# These are some generic agent options you might want to configure.
checkmk_agent_discover: 'true'
checkmk_agent_discover_max_parallel_tasks: 0
checkmk_agent_force_install: 'true'
checkmk_agent_delegate_api_calls: localhost
checkmk_agent_delegate_download: "{{ inventory_hostname }}"
checkmk_agent_host_name: "{{ inventory_hostname }}"
checkmk_agent_host_folder: "{{ checkmk_var_site }}"
checkmk_agent_host_ip: "{{ ansible_host }}"
checkmk_agent_host_attributes:
ipaddress: "{{ checkmk_agent_host_ip | default(omit) }}"
roles:
- agent