Fix a few more Jinja2 filters used as tests

I had created these earlier in this branch before rebasing it on top
of the Ansible 2.5.0 readiness branch.

See: https://docs.ansible.com/ansible/devel/porting_guides/porting_guide_2.5.html
This commit is contained in:
Alan Orth 2018-03-21 21:29:54 +02:00
parent d1ba60e15d
commit 632aa1cf14
5 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
{% if ansible_distribution_version | version_compare('18.04', '==') %} {% if ansible_distribution_version is version_compare('18.04', '==') %}
# 2018-03-17: no Ubuntu 18.04 "bionic" packages yet, so use 17.10 "artful" # 2018-03-17: no Ubuntu 18.04 "bionic" packages yet, so use 17.10 "artful"
deb https://pkg.tarsnap.com/deb/artful ./ deb https://pkg.tarsnap.com/deb/artful ./
{% else %} {% else %}

View File

@ -1,7 +1,7 @@
# {{ ansible_managed }} # {{ ansible_managed }}
{% if ansible_distribution == 'Ubuntu' %} {% if ansible_distribution == 'Ubuntu' %}
{% if ansible_distribution_version | version_compare('18.04', '==') %} {% if ansible_distribution_version is version_compare('18.04', '==') %}
# 2018-03-17: no Ubuntu 18.04 "bionic" packages yet, so use 17.10 "artful" # 2018-03-17: no Ubuntu 18.04 "bionic" packages yet, so use 17.10 "artful"
deb [arch=amd64,i386] http://mariadb.mirror.serveriai.lt/repo/10.2/ubuntu artful main deb [arch=amd64,i386] http://mariadb.mirror.serveriai.lt/repo/10.2/ubuntu artful main
{% else %} {% else %}

View File

@ -2,14 +2,14 @@
{% if ansible_distribution == 'Ubuntu' %} {% if ansible_distribution == 'Ubuntu' %}
{% if nginx_version == "stable" %} {% if nginx_version == "stable" %}
{% if ansible_distribution_version | version_compare('18.04', '==') %} {% if ansible_distribution_version is version_compare('18.04', '==') %}
# 2018-03-17: no Ubuntu 18.04 "bionic" packages yet, so use 17.10 "artful" # 2018-03-17: no Ubuntu 18.04 "bionic" packages yet, so use 17.10 "artful"
deb https://nginx.org/packages/ubuntu/ artful nginx deb https://nginx.org/packages/ubuntu/ artful nginx
{% else %} {% else %}
deb https://nginx.org/packages/ubuntu/ {{ ansible_distribution_release }} nginx deb https://nginx.org/packages/ubuntu/ {{ ansible_distribution_release }} nginx
{% endif %} {% endif %}
{% elif nginx_version == "mainline" %} {% elif nginx_version == "mainline" %}
{% if ansible_distribution_version | version_compare('18.04', '==') %} {% if ansible_distribution_version is version_compare('18.04', '==') %}
# 2018-03-17: no Ubuntu 18.04 "bionic" packages yet, so use 17.10 "artful" # 2018-03-17: no Ubuntu 18.04 "bionic" packages yet, so use 17.10 "artful"
deb https://nginx.org/packages/mainline/ubuntu/ artful nginx deb https://nginx.org/packages/mainline/ubuntu/ artful nginx
{% else %} {% else %}

View File

@ -66,7 +66,7 @@ server {
{# As of Ubuntu 16.04 and Debian 9, the PHP-FPM configs are the same #} {# As of Ubuntu 16.04 and Debian 9, the PHP-FPM configs are the same #}
{% if (ansible_distribution == 'Ubuntu' and ansible_distribution_version is version_compare('16.04', '==')) or (ansible_distribution == 'Debian' and ansible_distribution_major_version is version_compare('9', '==')) %} {% if (ansible_distribution == 'Ubuntu' and ansible_distribution_version is version_compare('16.04', '==')) or (ansible_distribution == 'Debian' and ansible_distribution_major_version is version_compare('9', '==')) %}
fastcgi_pass unix:/run/php/php7.0-fpm-{{ domain_name }}.sock; fastcgi_pass unix:/run/php/php7.0-fpm-{{ domain_name }}.sock;
{% elif ansible_distribution == 'Ubuntu' and ansible_distribution_version | version_compare('18.04', '==') %} {% elif ansible_distribution == 'Ubuntu' and ansible_distribution_version is version_compare('18.04', '==') %}
fastcgi_pass unix:/run/php/php7.2-fpm-{{ domain_name }}.sock; fastcgi_pass unix:/run/php/php7.2-fpm-{{ domain_name }}.sock;
{% else %} {% else %}
fastcgi_pass unix:/var/run/php5-fpm-{{ domain_name }}.sock; fastcgi_pass unix:/var/run/php5-fpm-{{ domain_name }}.sock;

View File

@ -9,7 +9,7 @@
- name: Configure php-fpm on Ubuntu 18.04 - name: Configure php-fpm on Ubuntu 18.04
include_tasks: Ubuntu_18.04.yml include_tasks: Ubuntu_18.04.yml
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version | version_compare('18.04', '==') when: ansible_distribution == 'Ubuntu' and ansible_distribution_version is version_compare('18.04', '==')
tags: php-fpm tags: php-fpm
# vim: set ts=2 sw=2: # vim: set ts=2 sw=2: