fix path and set ownership
This commit is contained in:
parent
16ae8d2f40
commit
4da800144c
1 changed files with 8 additions and 6 deletions
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
- name: Create custom theme folder
|
||||
file:
|
||||
path: /usr/src/nagio4_theme
|
||||
path: /usr/src/nagios4_theme
|
||||
state: directory
|
||||
owner: www-data
|
||||
group: www-data
|
||||
|
@ -10,13 +10,15 @@
|
|||
unarchive:
|
||||
remote_src: true
|
||||
src: "{{ custom_theme_url }}"
|
||||
dest: /usr/src/nagio4_theme
|
||||
dest: /usr/src/nagios4_theme
|
||||
list_files: true
|
||||
owner: www-data
|
||||
group: www-data
|
||||
register: zip_files
|
||||
|
||||
- name: Set permissions to custom theme folder
|
||||
file:
|
||||
path: "/usr/src/nagio4_theme/{{ zip_files.files[0] }}"
|
||||
path: "/usr/src/nagios4_theme/{{ zip_files.files[0] }}"
|
||||
state: directory
|
||||
owner: www-data
|
||||
group: www-data
|
||||
|
@ -43,13 +45,13 @@
|
|||
file:
|
||||
state: link
|
||||
path: /etc/nagios4/stylesheets
|
||||
src: /usr/src/nagio4_theme/{{ zip_files.files[0] }}/stylesheets
|
||||
src: /usr/src/nagios4_theme/{{ zip_files.files[0] }}/stylesheets
|
||||
owner: www-data
|
||||
group: www-data
|
||||
|
||||
- name: Get custom theme index.php stats
|
||||
stat:
|
||||
path: /usr/src/nagio4_theme//{{ zip_files.files[0] }}/index.php
|
||||
path: /usr/src/nagios4_theme//{{ zip_files.files[0] }}/index.php
|
||||
register: index_php
|
||||
|
||||
- name: Backup previous index.php
|
||||
|
@ -62,6 +64,6 @@
|
|||
- name: Copy custom index.php
|
||||
copy:
|
||||
remote_src: true
|
||||
src: /usr/src/nagio4_theme//{{ zip_files.files[0] }}/index.php
|
||||
src: /usr/src/nagios4_theme//{{ zip_files.files[0] }}/index.php
|
||||
dest: /usr/share/nagios4/htdocs/index.php
|
||||
when: index_php.stat.exists
|
||||
|
|
Loading…
Reference in a new issue