add web-nossl.yml
authorLorin Hochstein <lorin.hochstein@sendgrid.com>
Wed, 4 Feb 2015 02:21:20 +0000 (21:21 -0500)
committerLorin Hochstein <lorin.hochstein@sendgrid.com>
Wed, 4 Feb 2015 02:21:20 +0000 (21:21 -0500)
ch02/playbooks/web-nossl.yml [new file with mode: 0644]

diff --git a/ch02/playbooks/web-nossl.yml b/ch02/playbooks/web-nossl.yml
new file mode 100644 (file)
index 0000000..31ffc17
--- /dev/null
@@ -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