Skip to content

Commit 9218c10

Browse files
committed
Ensure ServiceCheckDaemon
1 parent 740b459 commit 9218c10

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

roles/ifw/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ The default values for some variables - like the ones for JEA and the API featur
130130

131131
- `ifw_api_feature: boolean`
132132
Whether to enable the Icinga for Windows API Check Forwarder.
133+
Be sure to install the `service` component if you want to make use of this feature.
133134
[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/).
134135
Default: `true`
135136

roles/ifw/meta/argument_specs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ argument_specs:
190190
ifw_api_feature:
191191
description:
192192
- Whether to enable the Icinga for Windows API Check Forwarder.
193+
Be sure to install the C(service) component if you want to make use of this feature.
193194
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/).
194195
type: bool
195196
required: false

roles/ifw/tasks/configure_icinga2.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,18 @@
138138
success_msg: "Configuration needs no update"
139139
register: _assertion_result
140140

141+
- name: Register IcingaServiceCheckDaemon
142+
when: ifw_api_feature or "service" in (ifw_components | map(attribute='name'))
143+
netways.icinga.ifw_backgrounddaemon:
144+
state: present
145+
command: "Start-IcingaServiceCheckDaemon"
146+
141147
- name: Set up Icinga
142-
timeout: 300
148+
async: 300
149+
poll: 30
143150
when: _assertion_result.evaluated_to is defined
144-
ansible.windows.win_shell: "Install-Icinga -InstallCommand \"{{ _install_command }}\""
151+
ansible.windows.win_powershell:
152+
script: "Install-Icinga -InstallCommand \"{{ _install_command }}\""
153+
arguments:
154+
- "-ExecutionPolicy"
155+
- "ByPass"

0 commit comments

Comments
 (0)