src.nth.io/

summaryrefslogtreecommitdiff
path: root/nginx-html-root
diff options
context:
space:
mode:
authorLuke Hoersten <[email protected]>2020-05-02 18:38:02 -0500
committerLuke Hoersten <[email protected]>2020-05-02 18:38:02 -0500
commit840fecf2edf2d94f380017a7e5f197e4bf72bb35 (patch)
tree0342afc43a24113c0d7eb54040f09a9dbbf3005f /nginx-html-root
parent4754bf298cf33084299872f74ed0840a72b5a86f (diff)
Added nginx web root.
Diffstat (limited to 'nginx-html-root')
-rw-r--r--nginx-html-root/tasks/main.yaml22
1 files changed, 22 insertions, 0 deletions
diff --git a/nginx-html-root/tasks/main.yaml b/nginx-html-root/tasks/main.yaml
new file mode 100644
index 0000000..3401ba0
--- /dev/null
+++ b/nginx-html-root/tasks/main.yaml
@@ -0,0 +1,22 @@
+---
+
+- name: install nginx packages
+ become: yes
+ apt: name="nginx"
+
+- name: disable default site
+ become: yes
+ file: path="/etc/nginx/sites-enabled/default" state="absent"
+ notify: restart nginx
+
+- name: create http directory
+ become: yes
+ file: path="{{nginx_html_root}}" state="directory"
+
+- name: install root files
+ become: yes
+ copy: src="{{nginx_html_src}}" dest="{{nginx_html_root}}"
+
+- name: enable nginx service
+ become: yes
+ systemd: name="nginx" enabled="yes" state="started"