# HG changeset patch # User Luke Hoersten # Date 1588462682 18000 # Node ID c2ff7e33d1e5119447678b4b05a5e2bd951cec1d # Parent 6d7db9bae6c2dbe2ae5bebbe9fafe012f35d7066 Added nginx web root. diff -r 6d7db9bae6c2 -r c2ff7e33d1e5 nginx-html-root/tasks/main.yaml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nginx-html-root/tasks/main.yaml Sat May 02 18:38:02 2020 -0500 @@ -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"