Skip to content

Commit

Permalink
fix htpasswd missing link for nagios config users
Browse files Browse the repository at this point in the history
  • Loading branch information
pablodav committed Apr 20, 2019
1 parent 34fc026 commit 6a26290
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
5 changes: 4 additions & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ thruk_mysql_db: thruk_logs
# Vars for copying thruk backgrounds
thruk_copy_backgrounds: false
thruk_backgrounds_path: '/etc/thruk/usercontent/backgrounds/'

thruk_local_conf: '/etc/thruk/thruk_local.conf'
thruk_htpasswd: '/etc/thruk/htpasswd'
thruk_use_htpasswd_nagios: True

# Performance optimizations
thruk_max_process_memory: '2048'
Expand Down Expand Up @@ -61,6 +63,7 @@ nagios_config_cfg_dir: "{{ nagios_etc }}/conf.d"
nagios_version: 4
nagios_service: nagios
nagios_config_file: "{{ nagios_etc }}/nagios.cfg"
nagios_htpasswd: "/usr/local/nagios/etc/htpasswd.users"
nagios_cgi_file: "{{ nagios_etc }}/cgi.cfg"
nsca_config_file: /etc/nsca.cfg

Expand Down
12 changes: 11 additions & 1 deletion tasks/config_thruk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,22 @@
- name: configure thruk
template:
src=thruk_local.conf.j2
dest=/etc/thruk/thruk_local.conf
dest="{{ thruk_local_conf }}"
owner=www-data group=www-data mode=660
notify:
- Restart Apache
- Restart Thruk

- name: setup link for htpasswd file
file:
src: "{{ nagios_htpasswd }}"
dest: "{{ thruk_htpasswd }}"
state: link
force: yes
when: thruk_use_htpasswd_nagios
notify:
- Restart Apache

- name: link images/logos for thruk theme Exfoliation
file: src={{ item.src }} dest={{ item.dest }} state=link
with_items:
Expand Down

0 comments on commit 6a26290

Please sign in to comment.