Skip to content
Snippets Groups Projects
Commit 090ebcf9 authored by jurgenhaas's avatar jurgenhaas
Browse files

ansible-playbooks/general#85 Properly compare integer default values

parent 12483dc1
No related branches found
No related tags found
No related merge requests found
......@@ -22,13 +22,13 @@
- name: Install PECL packages
shell: pecl install --soft imagick-3.3.0
when: php_version_main|default('7') != '7'
when: php_version_main|default(7) != 7
ignore_errors: yes
# NOTE: If oauth is already installed and we install a new PHP 7 version then this fails and we need --force as well
- name: Install PECL packages
shell: pecl install --soft --force oauth
when: php_version_main|default('7') == '7'
when: php_version_main|default(7) == 7
ignore_errors: yes
- name: Ensure Apache config directory
......@@ -159,19 +159,19 @@
owner: root
group: root
mode: 0644
when: (php_version_main|default('7') == '7') and (jailkit is not defined or not jailkit) and (php_fpm)
when: (php_version_main|default(7) == 7) and (jailkit is not defined or not jailkit) and (php_fpm)
- block:
- name: Set facts for PHP 7
set_fact:
phpLogRotatePrefix: '{{php_version|default("7.0")}}'
phpLibPrefix: ''
when: php_version_main|default('7') == '7'
when: php_version_main|default(7) == 7
- name: Set facts for PHP 5
set_fact:
phpLogRotatePrefix: '5'
phpLibPrefix: '5'
when: php_version_main|default('7') != '7'
when: php_version_main|default(7) != 7
- name: Install logrotate script
template:
......
......@@ -8,10 +8,10 @@
- name: Set facts for PHP 5
set_fact:
phpFpmService: php-fpm
when: php_version_main|default('7') == '5'
when: php_version_main|default(7) == 5
- name: Set facts for PHP 7
set_fact:
phpFpmService: php{{php_version|default("7.0")}}-fpm
when: php_version_main|default('7') == '7'
when: php_version_main|default(7) == 7
tags:
- always
......@@ -1970,7 +1970,7 @@ ldap.max_links = -1
[Syslog]
define_syslog_variables = Off
{% if php_version|default('5.5') == '5.3' %}
{% if php_version|default(5.5) == 5.3 %}
[apc]
extension = apc.so
apc.rfc1867 = {{ apc_rfc1867 }}
......@@ -1988,7 +1988,7 @@ extension=imagick.so
extension=xmlrpc.so
{% endif %}
{% if php_version_main|default('7') == '7' %}
{% if php_version_main|default(7) == 7 %}
[oauth]
extension=oauth.so
{% endif %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment