From: Lorin Hochstein Date: Wed, 4 Feb 2015 02:21:20 +0000 (-0500) Subject: add web-nossl.yml X-Git-Url: https://git.halfball.org/?a=commitdiff_plain;h=d5b9c6a571b9582bd64eea042c195c5bfe7e454d;p=ansiblebook.git add web-nossl.yml --- diff --git a/ch02/playbooks/web-nossl.yml b/ch02/playbooks/web-nossl.yml new file mode 100644 index 0000000..31ffc17 --- /dev/null +++ b/ch02/playbooks/web-nossl.yml @@ -0,0 +1,18 @@ +--- +- name: Configure webserver with nginx + hosts: webservers + sudo: True + tasks: + - name: install nginx + apt: name=nginx update_cache=yes + - name: copy nginx config file + copy: src=files/nginx.conf dest=/etc/nginx/sites-available/default + - name: enable configuration + file: > + dest=/etc/nginx/sites-enabled/default + src=/etc/nginx/sites-available/default + state=link + - name: copy index.html + copy: src=files/index.html dest=/usr/share/nginx/html/index.html mode=0644 + - name: restart nginx + service: name=nginx state=restarted