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