first commit

This commit is contained in:
root
2024-07-12 12:58:40 +02:00
commit 30fdad3be5
557 changed files with 11142 additions and 0 deletions

View File

@@ -0,0 +1,64 @@
---
- name: run automation for windows
gather_facts: yes
hosts: all
become_method: runas
# roles:
# - windows_install-check-mk
tasks:
- name: Add all hosts running this playbook to the done group
ansible.builtin.add_host:
name: '{{ item }}.adagility.net'
groups: checkmk_hosts
loop: "{{ ansible_play_hosts }}"
- name: Onboard host to checkmk GUI
become: true
become_user: root
hosts: localhost
tasks:
- name:
debug:
var: item
with_inventory_hostnames:
- checkmk_hosts
- name: Add host
tribe29.checkmk.host:
server_url: "https://monitoringeu.aperam.internal/"
site: "monaperam"
automation_user: "ansible"
automation_secret: "TJXTVH@GFYPRNCJCWUMY"
name: "{{item}}"
validate_certs: false
folder: "/{{foldername}}"
state: present
with_inventory_hostnames:
- checkmk_hosts
- name: "Add newly discovered services on host."
tribe29.checkmk.discovery:
server_url: "https://monitoringeu.aperam.internal/"
site: "monaperam"
automation_user: "ansible"
automation_secret: "TJXTVH@GFYPRNCJCWUMY"
host_name: "{{item}}"
state: "new"
validate_certs: false
with_inventory_hostnames:
- checkmk_hosts
- name: "Activate changes on all sites."
tribe29.checkmk.activation:
server_url: "https://monitoringeu.aperam.internal/"
site: "monaperam"
automation_user: "ansible"
automation_secret: "TJXTVH@GFYPRNCJCWUMY"
force_foreign_changes: 'true'
validate_certs: false
run_once: 'true'