Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelogs/fragments/fix_ifw_winrm_stuck_idle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
bugfixes:
- "Using :code:`ansible.windows.win_powershell` for the :code:`Install-Icinga` command can sometimes get stuck and stay idle indefinitely.
The according task now uses :code:`ansible.windows.win_shell` as this seems to be more reliable."
16 changes: 11 additions & 5 deletions roles/ifw/tasks/configure_icinga2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@
src: "/tmp/{{ ifw_icinga2_cn }}.crt"
register: _icinga2_host_cert

- name: Remove temporary CSR and CRT
become: true
delegate_to: "{{ ifw_icinga2_ca_host | default('localhost', true) }}"
loop:
- "/tmp/{{ ifw_icinga2_cn }}.csr"
- "/tmp/{{ ifw_icinga2_cn }}.crt"
ansible.builtin.file:
state: absent
path: "{{ item }}"

- name: Deploy host certificate
when: not ifw_icinga2_ca_host is none
ansible.windows.win_copy:
Expand Down Expand Up @@ -148,8 +158,4 @@
async: 300
poll: 30
when: _assertion_result.evaluated_to is defined
ansible.windows.win_powershell:
script: "Install-Icinga -InstallCommand \"{{ _install_command }}\""
arguments:
- "-ExecutionPolicy"
- "ByPass"
ansible.windows.win_shell: "Install-Icinga -InstallCommand '{{ _install_command }}'"
2 changes: 1 addition & 1 deletion roles/ifw/tasks/install_components.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
- name: Validate requested components are installable
loop: "{{ ifw_components }}"
ansible.builtin.assert:
that: "{{ item.name in (_available_components_json | map(attribute='key') | sort) }}"
that: item.name in (_available_components_json | map(attribute='key') | sort)
fail_msg: "'{{ item.name }}' is not an installable component! (Keep component names lowercase)"

- name: Remove non requested components
Expand Down