From 446d4027781fa50db6699b19d8d443e9029d6683 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Thu, 27 Jul 2023 18:46:13 +0300 Subject: [PATCH] roles: minor fix to Debian version comparisons --- roles/nginx/templates/vhost.conf.j2 | 2 +- roles/php-fpm/tasks/main.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/nginx/templates/vhost.conf.j2 b/roles/nginx/templates/vhost.conf.j2 index 983e6c1..0b9b649 100644 --- a/roles/nginx/templates/vhost.conf.j2 +++ b/roles/nginx/templates/vhost.conf.j2 @@ -75,7 +75,7 @@ server { # See: https://httpoxy.org/ fastcgi_param HTTP_PROXY ""; - {% if (ansible_distribution == 'Ubuntu' and ansible_distribution_version is version('20.04', '==')) or (ansible_distribution == 'Debian' and ansible_distribution_version is version('11', '==')) %} + {% if (ansible_distribution == 'Ubuntu' and ansible_distribution_version is version('20.04', '==')) or (ansible_distribution == 'Debian' and ansible_distribution_major_version is version('11', '==')) %} fastcgi_pass unix:/run/php/php7.4-fpm-{{ domain_name }}.sock; {% else %} fastcgi_pass unix:/var/run/php5-fpm-{{ domain_name }}.sock; diff --git a/roles/php-fpm/tasks/main.yml b/roles/php-fpm/tasks/main.yml index d66cb0e..17f105d 100644 --- a/roles/php-fpm/tasks/main.yml +++ b/roles/php-fpm/tasks/main.yml @@ -37,7 +37,7 @@ ansible.builtin.include_tasks: Ubuntu_20.04.yml when: - ansible_distribution == 'Debian' - - ansible_distribution_version is version('11', '==') + - ansible_distribution_major_version is version('11', '==') - install_php == true tags: php-fpm