mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-31 15:48:57 +02:00
Renamed webserver roles to more speakable names
This commit is contained in:
36
roles/srv-core/tasks/04_directories.yml
Normal file
36
roles/srv-core/tasks/04_directories.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
- name: Ensure nginx configuration directories are present
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
owner: "{{ NGINX.USER }}"
|
||||
group: "{{ NGINX.USER }}"
|
||||
mode: '0755'
|
||||
recurse: yes
|
||||
loop: >
|
||||
{{
|
||||
( NGINX.DIRECTORIES.HTTP.values() | list ) +
|
||||
[ NGINX.DIRECTORIES.STREAMS ]
|
||||
}}
|
||||
|
||||
- name: Ensure all NGINX cache directories exist
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
path: "{{ item.value }}"
|
||||
state: directory
|
||||
owner: "{{ NGINX.USER }}"
|
||||
group: "{{ NGINX.USER }}"
|
||||
mode: '0700'
|
||||
loop: "{{ NGINX.DIRECTORIES.CACHE | dict2items }}"
|
||||
loop_control:
|
||||
label: "{{ item.key }}"
|
||||
|
||||
- name: Ensure nginx data storage directories are present
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
recurse: yes
|
||||
owner: "{{ NGINX.USER }}"
|
||||
group: "{{ NGINX.USER }}"
|
||||
mode: '0755'
|
||||
loop: >
|
||||
{{ NGINX.DIRECTORIES.DATA.values() | list }}
|
Reference in New Issue
Block a user