mirror of
https://git.ecdf.ed.ac.uk/win_automation/windows-ansible.git
synced 2026-10-26 13:07:21 +00:00
added checkmk
This commit is contained in:
1 parent
ec51514030
commit
6eb7898995
2 files changed
+72
No files matched your search
@@ -0,0 +1,59 @@
|
||||
---
|
||||
- name: CheckMK Agent
|
||||
hosts: "meta-win_project_{{ win_project }}"
|
||||
collections:
|
||||
- checkmk.general
|
||||
vars_files:
|
||||
- ../vars/checkmk.yml
|
||||
- ../vars/common.yml
|
||||
- ../vars/connection.yml
|
||||
vars:
|
||||
ansible_password: "{{ fake_ansible_password }}"
|
||||
tasks:
|
||||
- name: Install CheckMK agent on VMs
|
||||
import_role:
|
||||
name: agent
|
||||
tags:
|
||||
- checkmk
|
||||
- checkmk_agent
|
||||
|
||||
- name: CheckMK Hosts
|
||||
hosts: "meta-win_project_{{ win_project }}"
|
||||
gather_facts: false
|
||||
vars_files:
|
||||
- ../vars/checkmk.yml
|
||||
- ../vars/common.yml
|
||||
tasks:
|
||||
- name: Add Windows host into check
|
||||
checkmk.general.host:
|
||||
server_url: "{{ checkmk_agent_protocol }}://{{ checkmk_server }}:80/"
|
||||
site: "{{ checkmk_agent_site }}"
|
||||
validate_certs: "true"
|
||||
automation_user: "{{ checkmk_agent_user }}"
|
||||
automation_secret: "{{ checkmk_password }}"
|
||||
folder: "/"
|
||||
name: "{{ inventory_hostname }}"
|
||||
attributes:
|
||||
ipaddress: "{{ hostvars[inventory_hostname].ansible_host }}"
|
||||
state: "{{ state }}"
|
||||
delegate_to: "localhost"
|
||||
notify: "activate changes"
|
||||
tags:
|
||||
- checkmk_host
|
||||
- checkmk_all
|
||||
|
||||
handlers:
|
||||
- name: "Activate Changes"
|
||||
listen: activate changes
|
||||
checkmk.general.activation:
|
||||
server_url: "{{ checkmk_agent_protocol }}://{{ checkmk_server }}:80/"
|
||||
site: "{{ checkmk_agent_site }}"
|
||||
automation_user: "{{ checkmk_agent_user }}"
|
||||
automation_secret: "{{ checkmk_password }}"
|
||||
force_foreign_changes: "false"
|
||||
validate_certs: "true"
|
||||
delegate_to: "localhost"
|
||||
run_once: true
|
||||
tags:
|
||||
- checkmk_host
|
||||
- checkmk_all
|
||||
@@ -0,0 +1,13 @@
|
||||
checkmk_server: 10.24.1.150
|
||||
checkmk_agent_server: "{{ checkmk_server }}"
|
||||
checkmk_agent_site: openstack
|
||||
checkmk_agent_registration_site: "{{ checkmk_agent_site }}"
|
||||
checkmk_agent_registration_server: "{{ checkmk_agent_server }}"
|
||||
checkmk_agent_server_validate_certs: 'false'
|
||||
checkmk_agent_protocol: http
|
||||
checkmk_agent_user: cmkadmin
|
||||
checkmk_agent_pass: "{{ checkmk_password }}"
|
||||
checkmk_agent_update: 'true'
|
||||
checkmk_agent_tls: 'false'
|
||||
checkmk_agent_add_host: 'false'
|
||||
checkmk_agent_edition: cre
|
||||
Reference in new issue
Block a user