From 9aef892765c9393939ecbe74ec1ee15bda96dfbc Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Wed, 7 Jul 2021 11:29:07 +0200 Subject: [PATCH] Fix the build of the unicorn backend. --- tasks/unicorn.yml | 2 +- templates/nginx_unicorn.conf.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/unicorn.yml b/tasks/unicorn.yml index 0745c0c..6b22842 100644 --- a/tasks/unicorn.yml +++ b/tasks/unicorn.yml @@ -7,7 +7,7 @@ template: src=nginx_unicorn.conf.j2 dest=/etc/nginx/conf.d/nginx_unicorn.conf notify: Restart nginx - tags: [ 'ruby', 'redmine', 'unicorn' ] + tags: [ 'ruby', 'redmine', 'unicorn', 'unicorn_nginx' ] when: ansible_distribution_version is version_compare('18.04', '==') - block: diff --git a/templates/nginx_unicorn.conf.j2 b/templates/nginx_unicorn.conf.j2 index 9d4df22..f7b1b53 100644 --- a/templates/nginx_unicorn.conf.j2 +++ b/templates/nginx_unicorn.conf.j2 @@ -7,7 +7,7 @@ upstream unicorn { # server unix:/tmp/.sock fail_timeout=0; # for TCP setups, point these to your backend servers - {% for i in 0, {{ unicorn_worker_processes - 1 }} %} + {% for i in range(0, unicorn_worker_processes - 1) %} server 127.0.0.1:{{ unicorn_listen_port + i }} fail_timeout=0; {% endfor %} }