aboutsummaryrefslogtreecommitdiffstats
path: root/roles/httpd/tasks/main.yml
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2024-02-08 13:32:37 +0100
committerRomain Gonçalves <me@rgoncalves.se>2024-02-08 13:33:36 +0100
commitadfb09b9e19f7a31632eab01171693cb81ec75ef (patch)
tree7b05135581ff49e7a5655ab07af7bba2ada43585 /roles/httpd/tasks/main.yml
parent5c5b0fbf68dca224b7f92f5de0913fd684e7d3d9 (diff)
downloadrules-adfb09b9e19f7a31632eab01171693cb81ec75ef.tar.gz
refactor(roles): new variable naming standard
Diffstat (limited to 'roles/httpd/tasks/main.yml')
-rw-r--r--roles/httpd/tasks/main.yml32
1 files changed, 9 insertions, 23 deletions
diff --git a/roles/httpd/tasks/main.yml b/roles/httpd/tasks/main.yml
index 584ae0b..194f198 100644
--- a/roles/httpd/tasks/main.yml
+++ b/roles/httpd/tasks/main.yml
@@ -1,39 +1,25 @@
---
-- name: create httpd directory
+- name: create static sites directories
ansible.builtin.file:
- path: "{{ httpd_configuration_dir }}"
+ path: "{{ httpd_pre__sites_dir }}/{{ item.domain }}"
state: directory
- owner: 0
- group: 0
- mode: "0644"
-
-- name: create passwords directory
- ansible.builtin.file:
- path: "{{ httpd_passwords_dir }}"
- state: directory
- owner: "{{ httpd_user }}"
- group: "{{ httpd_group }}"
- mode: "0700"
-
-- name: create sites directory
- ansible.builtin.file:
- path: "{{ httpd_sites_dir }}"
- state: directory
- owner: 0
- group: 0
+ owner: "{{ httpd_pre__user }}"
+ group: "{{ httpd_pre__group }}"
mode: "0755"
+ loop: "{{ httpd__rules }}"
+ when: item.extra.type is defined and item.extra.type == "static"
- name: retrieve all configuration files
ansible.builtin.find:
- path: "{{ httpd_configuration_dir }}"
+ path: "{{ httpd_pre__configuration_dir }}"
patterns: "*.conf"
- register: httpd_configuration_files
+ register: httpd__configuration_files
- name: generate httpd configuration
ansible.builtin.template:
src: httpd.conf.j2
- dest: "{{ httpd_configuration_file }}"
+ dest: "{{ httpd_pre__configuration_file }}"
owner: 0
group: 0
mode: "0644"
remember that computers suck.