Skip to content

Commit 670df12

Browse files
committed
Add API Check Forwarder feature
1 parent 0983dbe commit 670df12

File tree

5 files changed

+27
-0
lines changed

5 files changed

+27
-0
lines changed

roles/ifw/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,12 @@ Table of contents:
119119
Whether to use the Icinga for Windows service user 'icinga' when `ifw_jea_install=true`.
120120
Default: `true`
121121

122+
- `ifw_api_feature: boolean`
123+
Whether to enable the Icinga for Windows API Check Forwarder.
124+
[Read more about the Icinga for Windows API Check Forwarder](https://icinga.com/docs/icinga-for-windows/latest/doc/110-Installation/30-API-Check-Forwarder/).
125+
Default: `true`
126+
127+
122128
### Getting a Certificate
123129

124130
If neither `ifw_icinga2_ca_host` nor `ifw_icinga2_ticket` is specified, your target host will connect to the first parent in `ifw_icinga2_parents` and file a CSR. This needs to be signed manually afterwards.

roles/ifw/defaults/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ ifw_icinga2_global_zones: []
2323

2424
ifw_jea_install: true
2525
ifw_jea_managed_user: true
26+
27+
ifw_api_feature: true

roles/ifw/meta/argument_specs.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,3 +180,10 @@ argument_specs:
180180
type: bool
181181
required: false
182182
default: true
183+
ifw_api_feature:
184+
description:
185+
- Whether to enable the Icinga for Windows API Check Forwarder.
186+
L(Read more about the Icinga for Windows API Check Forwarder, https://icinga.com/docs/icinga-for-windows/latest/doc/110-Installation/30-API-Check-Forwarder/).
187+
type: bool
188+
required: false
189+
default: true

roles/ifw/tasks/configure_icinga2.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@
108108
_current_parents0: "{{ _framework_config_live['IfW-ParentAddress:' + ifw_icinga2_parents[0].cn]['Values'][0] | default(none) }}"
109109
_current_parents1: "{{ (_framework_config_live['IfW-ParentAddress:' + ifw_icinga2_parents[1].cn]['Values'][0] if ifw_icinga2_parents | length > 1 else none) | default(none) }}" # noqa: yaml[line-length]
110110
_current_jea: "{{ _framework_config_live['IfW-InstallJEAProfile']['Selection'] }}"
111+
_current_api_feature: "{{ _framework_config_live['IfW-InstallApiChecks']['Selection'] }}"
111112

112113
- name: Check whether requested and existing configuration is identical
113114
failed_when: false
@@ -129,6 +130,8 @@
129130
- (_current_jea == "0" if (ifw_jea_install and not ifw_jea_managed_user) else true)
130131
- (_current_jea == "1" if (ifw_jea_install and ifw_jea_managed_user) else true)
131132
- (_current_jea == "2" if not ifw_jea_install else true)
133+
- (_current_api_feature == "0" if not ifw_api_feature else true)
134+
- (_current_api_feature == "1" if ifw_api_feature else true)
132135
fail_msg: "Configuration needs an update"
133136
success_msg: "Configuration needs no update"
134137
register: _assertion_result

roles/ifw/templates/windows/icinga_install_command.j2

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,5 +107,14 @@
107107
{# 2 Do not install JEA Profile #}
108108
"Selection": "2"
109109
{% endif %}
110+
},
111+
"IfW-InstallApiChecks": {
112+
{% if ifw_api_feature %}
113+
{# 1 -> Install Api-Checks feature #}
114+
"Selection": "1"
115+
{% else %}
116+
{# 0 -> Do not install Api-Checks feature #}
117+
"Selection": "0"
118+
{% endif %}
110119
}
111120
}

0 commit comments

Comments
 (0)