src.nth.io/

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nginx/handlers/main.yaml6
-rw-r--r--nginx/tasks/main.yaml13
-rw-r--r--oragono/handlers/main.yaml4
-rw-r--r--oragono/tasks/main.yaml4
-rw-r--r--oragono/templates/nginx.conf.j27
-rw-r--r--oragono/templates/oragono.yaml.j24
6 files changed, 28 insertions, 10 deletions
diff --git a/nginx/handlers/main.yaml b/nginx/handlers/main.yaml
index 1feca07..00e05bf 100644
--- a/nginx/handlers/main.yaml
+++ b/nginx/handlers/main.yaml
@@ -2,4 +2,8 @@
- name: restart nginx
become: yes
- systemd: name="nginx" state="restarted" daemon_reload="yes"
+ systemd: name="nginx.service" state="restarted" daemon_reload="yes"
+
+- name: reload nginx
+ become: yes
+ systemd: name="nginx.service" state="reloaded" daemon_reload="yes"
diff --git a/nginx/tasks/main.yaml b/nginx/tasks/main.yaml
index 846650d..f579e9c 100644
--- a/nginx/tasks/main.yaml
+++ b/nginx/tasks/main.yaml
@@ -3,27 +3,30 @@
- name: apt install nginx
become: yes
apt: name="nginx"
+ notify: restart nginx
- name: disable default site
become: yes
file: path="/etc/nginx/sites-enabled/default" state="absent"
+ notify: reload nginx
- name: install base config
become: yes
copy: src="nginx.conf" dest="/etc/nginx/nginx.conf"
- notify: restart nginx
+ notify: reload nginx
- name: make stream dirs
become: yes
file: path="/etc/nginx/streams-{{item}}" state="directory"
loop: ["available", "enabled"]
+ notify: reload nginx
- name: make config available
become: yes
template:
src: "{{nginx_conf_src}}"
dest: "/etc/nginx/{{nginx_server_type}}s-available/{{nginx_server_name}}.conf"
- notify: restart nginx
+ notify: reload nginx
- name: enable config
become: yes
@@ -31,14 +34,14 @@
src: "/etc/nginx/{{nginx_server_type}}s-available/{{nginx_server_name}}.conf"
dest: "/etc/nginx/{{nginx_server_type}}s-enabled/{{nginx_server_name}}.conf"
state: "link"
- notify: restart nginx
+ notify: reload nginx
- name: copy root files
become: yes
copy: src="{{nginx_root_src}}" dest="{{nginx_root_dest}}/"
when: nginx_root
- notify: restart nginx
+ notify: reload nginx
- name: enable nginx service
become: yes
- systemd: name="nginx" enabled="yes" state="started"
+ systemd: name="nginx.service" enabled="yes" state="started" daemon_reload="yes"
diff --git a/oragono/handlers/main.yaml b/oragono/handlers/main.yaml
index db381db..a45e622 100644
--- a/oragono/handlers/main.yaml
+++ b/oragono/handlers/main.yaml
@@ -3,3 +3,7 @@
- name: restart oragono
become: yes
systemd: name="oragono.service" state="restarted" daemon_reload="yes"
+
+- name: reload oragono
+ become: yes
+ systemd: name="oragono.service" state="reloaded"
diff --git a/oragono/tasks/main.yaml b/oragono/tasks/main.yaml
index f3cca91..1a06173 100644
--- a/oragono/tasks/main.yaml
+++ b/oragono/tasks/main.yaml
@@ -44,14 +44,14 @@
owner: "oragono"
group: "oragono"
mode: "0644"
- notify: restart oragono
+ notify: reload oragono
- name: copy motd file
become: yes
copy:
src: "{{oragono_motd}}"
dest: "/etc/oragono/oragono.motd"
- notify: restart oragono
+ notify: reload oragono
- name: install oragono service
become: yes
diff --git a/oragono/templates/nginx.conf.j2 b/oragono/templates/nginx.conf.j2
new file mode 100644
index 0000000..38719ec
--- /dev/null
+++ b/oragono/templates/nginx.conf.j2
@@ -0,0 +1,7 @@
+server {
+ listen 6697 ssl;
+ proxy_pass unix:/run/oragono/socket;
+
+ ssl_certificate {{nginx_ssl_cert}};
+ ssl_certificate_key {{nginx_ssl_privkey}};
+}
diff --git a/oragono/templates/oragono.yaml.j2 b/oragono/templates/oragono.yaml.j2
index 2e5a1cf..5344683 100644
--- a/oragono/templates/oragono.yaml.j2
+++ b/oragono/templates/oragono.yaml.j2
@@ -288,7 +288,7 @@ server:
# oragono will write files to disk under certain circumstances, e.g.,
# CPU profiling or data export. by default, these files will be written
# to the working directory. set this to customize:
- # output-path: "/home/oragono/out"
+ output-path: "/var/oragono"
# account options
accounts:
@@ -606,7 +606,7 @@ opers:
whois-line: "server admin"
# custom hostname
- vhost: "ops.{{oragono_network_name}}"
+ vhost: "opr.{{oragono_network_name}}"
# modes are the modes to auto-set upon opering-up
modes: +is acjknoqtuxv