mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Solved Matomo domain bug and refactored
This commit is contained in:
33
roles/nginx-modifier-css/tasks/main.yml
Normal file
33
roles/nginx-modifier-css/tasks/main.yml
Normal file
@@ -0,0 +1,33 @@
|
||||
- name: Ensure {{nginx.directories.global}} directory exists
|
||||
file:
|
||||
path: "{{nginx.directories.global}}"
|
||||
state: directory
|
||||
owner: "{{nginx.user}}"
|
||||
group: "{{nginx.user}}"
|
||||
mode: '0755'
|
||||
when: run_once_nginx_global_css is not defined and global_theming_enabled | bool
|
||||
|
||||
- name: Deploy global.css from template
|
||||
template:
|
||||
src: global.css.j2
|
||||
dest: "{{global_css_destination}}"
|
||||
owner: "{{nginx.user}}"
|
||||
group: "{{nginx.user}}"
|
||||
mode: '0644'
|
||||
when: run_once_nginx_global_css is not defined and global_theming_enabled | bool
|
||||
|
||||
- name: Get stat for global.css destination file
|
||||
stat:
|
||||
path: "{{ global_css_destination }}"
|
||||
register: global_css_stat
|
||||
when: run_once_nginx_global_css is not defined and global_theming_enabled | bool
|
||||
|
||||
- name: Set global_css_version to file modification time
|
||||
set_fact:
|
||||
global_css_version: "{{ global_css_stat.stat.mtime }}"
|
||||
when: run_once_nginx_global_css is not defined and global_theming_enabled | bool
|
||||
|
||||
- name: Mark global css tasks as run once
|
||||
set_fact:
|
||||
run_once_nginx_global_css: true
|
||||
when: run_once_nginx_global_css is not defined
|
Reference in New Issue
Block a user