aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--playbooks/vm2.rgoncalves.se.yml3
-rw-r--r--roles/cgit/meta/main.yml7
-rw-r--r--roles/cgit/tasks/main.yml20
-rw-r--r--roles/httpd/meta/main.yml8
-rw-r--r--roles/httpd/tasks/main.yml12
-rw-r--r--roles/httpd_pre/tasks/main.yml15
-rw-r--r--roles/stagit/meta/main.yml7
7 files changed, 46 insertions, 26 deletions
diff --git a/playbooks/vm2.rgoncalves.se.yml b/playbooks/vm2.rgoncalves.se.yml
index dacb4a4..c7136f9 100644
--- a/playbooks/vm2.rgoncalves.se.yml
+++ b/playbooks/vm2.rgoncalves.se.yml
@@ -8,7 +8,8 @@
- hosts: vm2
roles:
- - { role: git }
+ - { role: httpd_pre }
- { role: stagit }
+ - { role: cgit }
- { role: httpd }
#- { role: grafana }
diff --git a/roles/cgit/meta/main.yml b/roles/cgit/meta/main.yml
new file mode 100644
index 0000000..121b592
--- /dev/null
+++ b/roles/cgit/meta/main.yml
@@ -0,0 +1,7 @@
+
+# cgit ~~ roles/cgit/meta/main.yml
+# Meta parameters
+
+---
+
+dependencies: git
diff --git a/roles/cgit/tasks/main.yml b/roles/cgit/tasks/main.yml
index c5b2420..3a20a59 100644
--- a/roles/cgit/tasks/main.yml
+++ b/roles/cgit/tasks/main.yml
@@ -9,18 +9,8 @@
name: cgit
state: present
-- name: ensure httpd.d directory exists
- file: path=/etc/httpd.d state=directory
-
-- name: copy httpd configuration
- copy:
- src: httpd.conf
- dest: /etc/httpd.d/stagit.conf
- owner: "{{ user_root }}"
- group: "{{ group_root }}"
- mode: 0644
-
-- name: execute static-page generation script once
- shell: ./generate-static-git.sh
- args:
- chdir: "{{ stagit_htmldir }}"
+- name: start and enable slowcgi service
+ service:
+ name: slowcgi
+ state: restarted
+ enabled: true
diff --git a/roles/httpd/meta/main.yml b/roles/httpd/meta/main.yml
new file mode 100644
index 0000000..97eaea7
--- /dev/null
+++ b/roles/httpd/meta/main.yml
@@ -0,0 +1,8 @@
+
+# httpd ~~ roles/httpd/meta/main.yml
+# Meta for httpd
+
+---
+
+dependencies:
+ - role: http_pre
diff --git a/roles/httpd/tasks/main.yml b/roles/httpd/tasks/main.yml
index 4abf95a..6c91aac 100644
--- a/roles/httpd/tasks/main.yml
+++ b/roles/httpd/tasks/main.yml
@@ -1,17 +1,9 @@
-# dns ~~ roles/dns/tasks/main.yml
-# ensure host is using unified dns
+# httpd ~~ roles/httpd/tasks/main.yml
+# OpenBSD httpd
---
-- name: ensure httpd.d directory exists
- file:
- path: /etc/httpd.d
- state: directory
- owner: "{{ user_root }}"
- group: "{{ group_root }}"
- mode: 0644
-
- name: retrieve all configuration files
find:
path: /etc/httpd.d
diff --git a/roles/httpd_pre/tasks/main.yml b/roles/httpd_pre/tasks/main.yml
new file mode 100644
index 0000000..61b052a
--- /dev/null
+++ b/roles/httpd_pre/tasks/main.yml
@@ -0,0 +1,15 @@
+
+# httpd ~~ roles/httpd_pre/main.yml
+# prerequisites for `httpd` role
+
+---
+
+- name: ensure httpd.d directory exists
+ file:
+ path: /etc/httpd.d
+ state: directory
+ owner: "{{ user_root }}"
+ group: "{{ group_root }}"
+ mode: 0644
+
+
diff --git a/roles/stagit/meta/main.yml b/roles/stagit/meta/main.yml
new file mode 100644
index 0000000..db410a7
--- /dev/null
+++ b/roles/stagit/meta/main.yml
@@ -0,0 +1,7 @@
+
+# stagit ~~ roles/stagit/meta/main.yml
+# Meta parameters
+
+---
+
+dependencies: git
remember that computers suck.