migrate
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
---
|
||||
- name: Manage Checkmk host
|
||||
hosts: all
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- name: "Create or update host in Checkmk"
|
||||
checkmk.general.host:
|
||||
server_url: "<< checkmk_protocol >>://<< checkmk_server >>"
|
||||
site: << checkmk_site >>
|
||||
automation_user: << checkmk_user >>
|
||||
automation_secret: << checkmk_pass >>
|
||||
name: << host_name >>
|
||||
attributes:
|
||||
ipaddress: << host_ip >>
|
||||
folder: << host_folder >>
|
||||
state: "present"
|
||||
delegate_to: localhost
|
||||
run_once: true
|
||||
@@ -0,0 +1,94 @@
|
||||
{
|
||||
"slug": "checkmk-manage-host",
|
||||
"kind": "ansible",
|
||||
"metadata": {
|
||||
"name": "Manage Checkmk Host",
|
||||
"description": "Manages host entries in Checkmk monitoring using the checkmk.general.host Ansible module. Creates or updates host configuration in your Checkmk instance.",
|
||||
"tags": [],
|
||||
"icon": {
|
||||
"provider": "selfhst",
|
||||
"id": "checkmk"
|
||||
},
|
||||
"draft": false,
|
||||
"version": {
|
||||
"name": "2.4.0",
|
||||
"source_dep_name": "manual/checkmk-manage-host"
|
||||
}
|
||||
},
|
||||
"variables": [
|
||||
{
|
||||
"title": "Checkmk Configuration",
|
||||
"name": "checkmk",
|
||||
"items": [
|
||||
{
|
||||
"name": "checkmk_server",
|
||||
"type": "str",
|
||||
"title": "Checkmk Server",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "checkmk_protocol",
|
||||
"type": "str",
|
||||
"title": "Protocol",
|
||||
"required": true,
|
||||
"default": "https",
|
||||
"config": {
|
||||
"placeholder": "https"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "checkmk_site",
|
||||
"type": "str",
|
||||
"title": "Checkmk Site",
|
||||
"required": true,
|
||||
"default": "cmk",
|
||||
"config": {
|
||||
"placeholder": "cmk"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "checkmk_user",
|
||||
"type": "str",
|
||||
"title": "Checkmk Automation User",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "checkmk_pass",
|
||||
"type": "secret",
|
||||
"title": "Automation Password",
|
||||
"required": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Host Configuration",
|
||||
"name": "host",
|
||||
"items": [
|
||||
{
|
||||
"name": "host_name",
|
||||
"type": "str",
|
||||
"title": "Host Name",
|
||||
"required": true,
|
||||
"description": "Hostname to add to Checkmk"
|
||||
},
|
||||
{
|
||||
"name": "host_ip",
|
||||
"type": "str",
|
||||
"title": "Host IP",
|
||||
"required": true,
|
||||
"description": "IP address of the host"
|
||||
},
|
||||
{
|
||||
"name": "host_folder",
|
||||
"type": "str",
|
||||
"title": "Folder Path",
|
||||
"required": true,
|
||||
"default": "/",
|
||||
"config": {
|
||||
"placeholder": "/"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user