Skip to content

Commit

Permalink
Merge pull request #200 from tribe29/revert-199-feature-new-pass-hashing
Browse files Browse the repository at this point in the history
Revert "Add support for new password hashing algorithm to agent role"
  • Loading branch information
robin-checkmk committed Dec 2, 2022
2 parents ed00484 + f0893df commit 9744617
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 62 deletions.
44 changes: 0 additions & 44 deletions changelogs/fragments/new-passwd-hashing.yml

This file was deleted.

2 changes: 1 addition & 1 deletion roles/server/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ checkmk_server_server_stable_os:
- RedHat-8

checkmk_server_edition: cre
checkmk_server_version: 2.1.0p17
checkmk_server_version: 2.1.0p13
checkmk_server_verify_setup: 'true'

checkmk_server_download_user: []
Expand Down
19 changes: 2 additions & 17 deletions roles/server/tasks/sites.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
tags:
- destroy-sites

- name: "Update Site Admin Password for Checkmk < 2.1."
- name: "Update Site Admin Password."
become: true
ansible.builtin.shell: |
set -o pipefail
Expand All @@ -90,21 +90,6 @@
executable: /bin/bash
no_log: true
loop: "{{ checkmk_server_sites }}"
when: (item.state != "absent") and (item.version | regex_replace('p.*', '') is version('2.1', '<'))
tags:
- set-site-admin-pw

# In the future this should be done with 'cmk-passwd' available from 2.1.0p16 (https://checkmk.com/werk/14389)
# To keep things simple, we do it in a more generic way here, which works in all 2.1 releases
- name: "Update Site Admin Password for Checkmk >= 2.1."
become: true
ansible.builtin.shell: |
set -o pipefail
echo '{{ item.admin_pw }}' | htpasswd -i -B -C 12 /omd/sites/{{ item.name }}/etc/htpasswd cmkadmin
args:
executable: /bin/bash
no_log: true
loop: "{{ checkmk_server_sites }}"
when: (item.state != "absent") and (item.version | regex_replace('p.*', '') is version('2.1', '>='))
when: item.state != "absent"
tags:
- set-site-admin-pw

0 comments on commit 9744617

Please sign in to comment.