From 840fecf2edf2d94f380017a7e5f197e4bf72bb35 Mon Sep 17 00:00:00 2001 From: Luke Hoersten Date: Sat, 2 May 2020 18:38:02 -0500 Subject: Added nginx web root. --- nginx-html-root/tasks/main.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 nginx-html-root/tasks/main.yaml (limited to 'nginx-html-root/tasks/main.yaml') 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" -- cgit v1.2.3