--- - name: "Manage Checkmk hosts" hosts: localhost gather_facts: false vars_files: - secrets.yaml vars: server_url: "http://192.168.2.4:5000" site: "cmk" tasks: - name: "Create host - PVE01" checkmk.general.host: server_url: "{{ server_url }}" site: "{{ site }}" automation_user: "{{ automation_user }}" automation_secret: "{{ automation_secret }}" name: "pve01" attributes: ipaddress: "192.168.2.1" folder: "/" state: "present" - name: "Create host - PVE02" checkmk.general.host: server_url: "{{ server_url }}" site: "{{ site }}" automation_user: "{{ automation_user }}" automation_secret: "{{ automation_secret }}" name: "pve02" attributes: ipaddress: "192.168.2.2" folder: "/" state: "present" - name: "Create host - beszel" checkmk.general.host: server_url: "{{ server_url }}" site: "{{ site }}" automation_user: "{{ automation_user }}" automation_secret: "{{ automation_secret }}" name: "Beszel" attributes: ipaddress: "192.168.2.3" folder: "/" state: "present" - name: "Create host - Checkmk" checkmk.general.host: server_url: "{{ server_url }}" site: "{{ site }}" automation_user: "{{ automation_user }}" automation_secret: "{{ automation_secret }}" name: "Checkmk" attributes: ipaddress: "192.168.2.4" folder: "/" state: "present" - name: "Create host - komodo" checkmk.general.host: server_url: "{{ server_url }}" site: "{{ site }}" automation_user: "{{ automation_user }}" automation_secret: "{{ automation_secret }}" name: "komodo" attributes: ipaddress: "192.168.2.5" folder: "/" state: "present" - name: "Create host - Datacenter" checkmk.general.host: server_url: "{{ server_url }}" site: "{{ site }}" automation_user: "{{ automation_user }}" automation_secret: "{{ automation_secret }}" name: "Datacenter" attributes: ipaddress: "192.168.2.6" folder: "/" state: "present" - name: "Create host - DockerApps" checkmk.general.host: server_url: "{{ server_url }}" site: "{{ site }}" automation_user: "{{ automation_user }}" automation_secret: "{{ automation_secret }}" name: "DockerApps" attributes: ipaddress: "192.168.2.7" folder: "/" state: "present" - name: "Create host - PIHOLE" checkmk.general.host: server_url: "{{ server_url }}" site: "{{ site }}" automation_user: "{{ automation_user }}" automation_secret: "{{ automation_secret }}" name: "PiHole" attributes: ipaddress: "192.168.2.8" folder: "/" state: "present" - name: "Create host - TECHNITIUMDNS" checkmk.general.host: server_url: "{{ server_url }}" site: "{{ site }}" automation_user: "{{ automation_user }}" automation_secret: "{{ automation_secret }}" name: "TechnitiumDNS" attributes: ipaddress: "192.168.2.9" folder: "/" state: "present" - name: "Create host - Wireguard" checkmk.general.host: server_url: "{{ server_url }}" site: "{{ site }}" automation_user: "{{ automation_user }}" automation_secret: "{{ automation_secret }}" name: "Wireguard" attributes: ipaddress: "192.168.2.10" folder: "/" state: "present" - name: "Create host - Ansible" checkmk.general.host: server_url: "{{ server_url }}" site: "{{ site }}" automation_user: "{{ automation_user }}" automation_secret: "{{ automation_secret }}" name: "Ansible" attributes: ipaddress: "192.168.2.11" folder: "/" state: "present" - name: "Create host - LinkWarden" checkmk.general.host: server_url: "{{ server_url }}" site: "{{ site }}" automation_user: "{{ automation_user }}" automation_secret: "{{ automation_secret }}" name: "LinkWarden" attributes: ipaddress: "192.168.2.12" folder: "/" state: "present" - name: "Create host - Immich" checkmk.general.host: server_url: "{{ server_url }}" site: "{{ site }}" automation_user: "{{ automation_user }}" automation_secret: "{{ automation_secret }}" name: "Immich" attributes: ipaddress: "192.168.2.13" folder: "/" state: "present" - name: "Create host - RetroGaming" checkmk.general.host: server_url: "{{ server_url }}" site: "{{ site }}" automation_user: "{{ automation_user }}" automation_secret: "{{ automation_secret }}" name: "RetroGaming" attributes: ipaddress: "192.168.2.14" folder: "/" state: "present" - name: "Create host - MediaServer" checkmk.general.host: server_url: "{{ server_url }}" site: "{{ site }}" automation_user: "{{ automation_user }}" automation_secret: "{{ automation_secret }}" name: "MediaServer" attributes: ipaddress: "192.168.2.16" folder: "/" state: "present" - name: "Create host - NetBird1" checkmk.general.host: server_url: "{{ server_url }}" site: "{{ site }}" automation_user: "{{ automation_user }}" automation_secret: "{{ automation_secret }}" name: "NetBird1" attributes: ipaddress: "192.168.2.17" folder: "/" state: "present" - name: "Create host - NetBird2" checkmk.general.host: server_url: "{{ server_url }}" site: "{{ site }}" automation_user: "{{ automation_user }}" automation_secret: "{{ automation_secret }}" name: "NetBird2" attributes: ipaddress: "192.168.2.18" folder: "/" state: "present" - name: "Create host - VaultWarden" checkmk.general.host: server_url: "{{ server_url }}" site: "{{ site }}" automation_user: "{{ automation_user }}" automation_secret: "{{ automation_secret }}" name: "VaultWarden" attributes: ipaddress: "192.168.2.19" folder: "/" state: "present" - name: "Create host - Glance" checkmk.general.host: server_url: "{{ server_url }}" site: "{{ site }}" automation_user: "{{ automation_user }}" automation_secret: "{{ automation_secret }}" name: "Glance" attributes: ipaddress: "192.168.2.20" folder: "/" state: "present" - name: "Create host - NPM" checkmk.general.host: server_url: "{{ server_url }}" site: "{{ site }}" automation_user: "{{ automation_user }}" automation_secret: "{{ automation_secret }}" name: "Npm" attributes: ipaddress: "192.168.2.22" folder: "/" state: "present" - name: "Create host - Searxng" checkmk.general.host: server_url: "{{ server_url }}" site: "{{ site }}" automation_user: "{{ automation_user }}" automation_secret: "{{ automation_secret }}" name: "Searxng" attributes: ipaddress: "192.168.2.23" folder: "/" state: "present" - name: "Create host - Gitea" checkmk.general.host: server_url: "{{ server_url }}" site: "{{ site }}" automation_user: "{{ automation_user }}" automation_secret: "{{ automation_secret }}" name: "Gitea" attributes: ipaddress: "192.168.2.24" folder: "/" state: "present" - name: "Start activation on a specific site" checkmk.general.activation: server_url: "{{ server_url }}" site: "{{ site }}" automation_user: "{{ automation_user }}" automation_secret: "{{ automation_secret }}" force_foreign_changes: 'true' sites: - "{{ site }}"