Skip to content

Commit

Permalink
Merge pull request #702 from Checkmk/feature/role-argument-specs
Browse files Browse the repository at this point in the history
Add argument specs for roles
  • Loading branch information
robin-checkmk authored Dec 24, 2024
2 parents 7c91763 + c9c74b1 commit 9da1818
Show file tree
Hide file tree
Showing 3 changed files with 334 additions and 2 deletions.
209 changes: 209 additions & 0 deletions roles/agent/meta/argument_specs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
argument_specs:

main:
short_description: Install Checkmk agents
description:
- This role installs Checkmk agents.
author:
- Robin Gierse

options:

checkmk_agent_version:
type: "str"
default: "2.3.0p19"
description:
- Refer to the README for details.

checkmk_agent_edition:
type: "str"
default: "cre"
description:
- Refer to the README for details.

checkmk_agent_server:
type: "str"
required: true
description:
- Refer to the README for details.

checkmk_agent_server_protocol:
type: "str"
default: "http"
description:
- Refer to the README for details.

checkmk_agent_site:
type: "str"
required: true
description:
- Refer to the README for details.

checkmk_agent_registration_server_protocol:
type: "str"
default: "{{ checkmk_agent_server_protocol }}"
description:
- Refer to the README for details.

checkmk_agent_registration_server:
type: "str"
default: "{{ checkmk_agent_server }}"
description:
- Refer to the README for details.

checkmk_agent_registration_site:
type: "str"
default: "{{ checkmk_agent_site }}"
description:
- Refer to the README for details.

checkmk_agent_server_validate_certs:
type: "bool"
default: true
description:
- Refer to the README for details.

checkmk_agent_server_port:
type: "str"
default: "{% if checkmk_agent_server_protocol == 'https' %}443{% else %}80{% endif %}"
description:
- Refer to the README for details.

checkmk_agent_user:
type: "str"
default: "{{ automation_user | default('automation') }}"
description:
- Refer to the README for details.

checkmk_agent_port:
type: "int"
default: 6556
description:
- Refer to the README for details.

checkmk_agent_pass:
type: "str"
default: "{{ checkmk_var_automation_secret }}"
description:
- Refer to the README for details.

checkmk_agent_secret:
type: "str"
default: "{{ checkmk_var_automation_secret }}"
description:
- Refer to the README for details.

checkmk_agent_auto_activate:
type: "bool"
default: false
description:
- Refer to the README for details.

checkmk_agent_add_host:
type: "bool"
default: false
description:
- Refer to the README for details.

checkmk_agent_discover:
type: "bool"
default: false
description:
- Refer to the README for details.

checkmk_agent_discover_max_parallel_tasks:
type: "int"
default: 0
description:
- Refer to the README for details.

checkmk_agent_force_foreign_changes:
type: "bool"
default: false
description:
- Refer to the README for details.

checkmk_agent_update:
type: "bool"
default: false
description:
- Refer to the README for details.

checkmk_agent_tls:
type: "bool"
default: false
description:
- Refer to the README for details.

checkmk_agent_configure_firewall:
type: "bool"
default: true
description:
- Refer to the README for details.

checkmk_agent_configure_firewall_zone:
type: "str"
default: "public"
description:
- Refer to the README for details.

checkmk_agent_server_ips:
type: "list"
elements: "str"
description:
- Refer to the README for details.

checkmk_agent_force_install:
type: "bool"
default: false
description:
- Refer to the README for details.

checkmk_agent_prep_legacy:
type: "bool"
default: false
description:
- Refer to the README for details.

checkmk_agent_delegate_api_calls:
type: "str"
default: "localhost"
description:
- Refer to the README for details.

checkmk_agent_delegate_download:
type: "str"
default: "{{ inventory_hostname }}"
description:
- Refer to the README for details.

checkmk_agent_host_name:
type: "str"
default: "{{ inventory_hostname }}"
description:
- Refer to the README for details.

checkmk_agent_folder:
type: "str"
default: "{{ checkmk_var_folder_path | default('/') }}"
description:
- Refer to the README for details.

checkmk_agent_host_attributes:
type: "dict"
default:
ipaddress: "{{ checkmk_agent_host_ip | default(omit) }}"
description:
- Refer to the README for details.

checkmk_agent_mode:
type: "str"
default: "pull"
description:
- Refer to the README for details.

checkmk_agent_no_log:
type: "bool"
default: true
description:
- Refer to the README for details.
123 changes: 123 additions & 0 deletions roles/server/meta/argument_specs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
argument_specs:

main:
short_description: Install and manage Checkmk servers
description:
- This role installs Checkmk on servers and manages sites.
author:
- Robin Gierse

options:

checkmk_server_version:
type: "str"
default: "2.3.0p19"
description:
- Refer to the README for details.

checkmk_server_edition:
type: "str"
default: "cre"
description:
- Refer to the README for details.

checkmk_server_verify_setup:
type: "bool"
default: true

checkmk_server_download_user:
type: "str"
description:
- Refer to the README for details.

checkmk_server_download_pass:
type: "str"
description:
- Refer to the README for details.

checkmk_server_sites:
type: "list"
elements: "dict"
options:
name:
type: "str"
required: true
description: "The name of the site."
version:
type: "str"
required: true
description: "The version of the site."
state:
type: "str"
required: true
description: "The desired target state for the site."
admin_pw:
type: "str"
description: "The initial password for the cmkadmin user."
update_conflict_resolution:
type: "str"
description: "How to handle file conflicts during updates."
omd_auto_restart:
type: "bool"
description: "Whether to automatically restart a site for configuration."
omd_config:
type: "list"
elements: "dict"
options:
var:
type: "str"
description: "The name of the OMD configuration variable."
value:
type: "str"
description: "The value of the variable."

checkmk_server_configure_firewall:
type: "bool"
default: true
description:
- Refer to the README for details.

checkmk_server_backup_on_update:
type: "bool"
default: true
description:
- Refer to the README for details.
Not recommended to disable this option!

checkmk_server_backup_dir:
type: "str"
default: "/tmp"
description:
- Refer to the README for details.

checkmk_server_backup_opts:
type: "str"
default: "--no-past"
description:
- Refer to the README for details.

checkmk_server_allow_downgrades:
type: "bool"
default: false
description:
- Refer to the README for details.


checkmk_server_epel_gpg_check:
type: "bool"
default: true
description:
- Refer to the README for details.


checkmk_server_cleanup:
type: "bool"
default: false
description:
- Refer to the README for details.

checkmk_server_no_log:
type: "bool"
default: true
description:
- Refer to the README for details.
4 changes: 2 additions & 2 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ collection_dir="${script_dir%/*}"

# Update these as necessary:
checkmk_ancient="2.1.0p48"
checkmk_oldstable="2.2.0p36"
checkmk_stable="2.3.0p20"
checkmk_oldstable="2.2.0p35"
checkmk_stable="2.3.0p19"

while getopts 's:t:' OPTION; do
case "$OPTION" in
Expand Down

0 comments on commit 9da1818

Please sign in to comment.