aboutsummaryrefslogtreecommitdiffstats
path: root/roles/httpd/tasks
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2021-12-07 15:39:14 +0000
committerRomain Gonçalves <me@rgoncalves.se>2021-12-07 20:24:51 +0000
commit12cf22b1a8d9ad23809ad8048119a6920cbb9675 (patch)
tree9b7e4334497162c2e922e181eb8b01c57fc67e7f /roles/httpd/tasks
parent333eff6a0aeefcbf573bbf5e725fc27b5b4cb9f6 (diff)
downloadrules-12cf22b1a8d9ad23809ad8048119a6920cbb9675.tar.gz
roles: Add httpd roles
Diffstat (limited to 'roles/httpd/tasks')
-rw-r--r--roles/httpd/tasks/main.yml19
1 files changed, 19 insertions, 0 deletions
diff --git a/roles/httpd/tasks/main.yml b/roles/httpd/tasks/main.yml
new file mode 100644
index 0000000..a272afa
--- /dev/null
+++ b/roles/httpd/tasks/main.yml
@@ -0,0 +1,19 @@
+- name: retrieve all configuration files
+ find:
+ path: "{{ httpd_configuration_dir }}"
+ patterns: "*.conf"
+ register: configuration_files
+
+- name: generate httpd configuration
+ template:
+ src: httpd.conf.j2
+ dest: "{{ httpd_configuration_file }}"
+ owner: 0
+ group: 0
+ mode: 0644
+
+- name: enable and restart httpd
+ service:
+ name: httpd
+ state: restarted
+ enabled: true
remember that computers suck.