30 lines
667 B
YAML
30 lines
667 B
YAML
---
|
|
- name: Get theme
|
|
unarchive:
|
|
remote_src: true
|
|
src: "{{ custom_theme_url }}"
|
|
dest: /usr/src/nagio4_theme
|
|
|
|
- name: Get current stylesheets stats
|
|
stat:
|
|
path: /etc/nagios4/stylesheets
|
|
register: stylesheets
|
|
|
|
- name: Copy old stylesheets
|
|
copy:
|
|
remote_src: true
|
|
src: /etc/nagios4/stylesheets
|
|
dest: /etc/nagios4/stylesheets_original
|
|
when: not stylesheets.stat.islnk
|
|
|
|
- name: Remove old stylesheets
|
|
file:
|
|
state: absent
|
|
path: /etc/nagios4/stylesheets
|
|
when: not stylesheets.stat.islnk
|
|
|
|
- name: Create link to custom theme
|
|
file:
|
|
state: link
|
|
path: /etc/nagios4/stylesheets
|
|
src: /usr/src/nagio4_theme/stylesheets
|