From 8d15711c0f107fe49b4c66a5814432373e2a228b Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Sun, 9 Apr 2017 23:25:33 +0200 Subject: [PATCH] Continued working on Ansible playbook --- ansible/debshots.yml | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/ansible/debshots.yml b/ansible/debshots.yml index d94b39a..a377108 100644 --- a/ansible/debshots.yml +++ b/ansible/debshots.yml @@ -21,6 +21,8 @@ - libssl-dev - libreadline-dev - zlib1g-dev + - libbz2-dev + - libpq-dev #- libcurl4-gnutls-dev #- ruby-bundler #- nodejs @@ -53,6 +55,12 @@ with_items: - nginx-extras - passenger + - name: Enable Passenger in main nginx.conf + lineinfile: + dest: /etc/nginx/nginx.conf + regexp: '# include /etc/nginx/passenger\.conf' + line: 'include /etc/nginx/passenger.conf;' + backrefs: yes # Install newer Ruby version using rbenv - name: Get rbenv @@ -75,9 +83,20 @@ - name: Build Ruby version shell: sudo -iu debshots rbenv install -v {{ruby_version}} creates=/opt/debshots/.rbenv/versions/{{ruby_version}} - - name: Install certbot to get certificates from Let's Encrypt + - name: Install certbot to get certificates from Lets Encrypt apt: name=certbot default_release=jessie-backports + - name: Install Bundler + gem: name=bundler + + - name: Install dependencies + shell: sudo -iu debshots bundle + + - name: Make sure that the public/ directory is readable by nginx + file: path=/opt/debshots/public mode='go+rx' + - name: Make sure that the config.ru is readable by nginx + file: path=/opt/debshots/config.ru mode='go+r' + - name: Deploy nginx config copy: src: files/nginx.conf @@ -85,5 +104,5 @@ notify: restart nginx - - debug: msg="Please run 'certbot certonly --webroot -w /opt/debshots/public -d screenshots.debian.net'" +# - debug: msg="Please run: certbot certonly --webroot -w /opt/debshots/public -d screenshots.debian.net"