8 Commits

Author SHA1 Message Date
Emilien Mantel
b08ebe25bb Drop Ubuntu Xenial support (16.04) 2021-09-01 09:47:35 +02:00
Emilien Mantel
abe0801363 Fix non idempotent call (forced change chmod on facts) 2021-09-01 09:42:31 +02:00
Emilien Mantel
6881f70517 Fix pkgng calls 2021-09-01 09:33:16 +02:00
Emilien Mantel
a6e75032a5 Use FQCN builtins 2021-08-31 13:02:57 +02:00
Emilien Mantel
57aee1fbc4 Fix YAML linter 2021-08-31 11:05:00 +02:00
Emilien Mantel
2f4bc96d6a Fix travis 2021-08-31 10:55:36 +02:00
Emilien Mantel
387b03ddbf Fix lint errors 2021-08-31 10:51:29 +02:00
Emilien Mantel
99f4da524b Manages Debian 11 and prepares Travis 2021-08-31 10:34:50 +02:00
6 changed files with 10 additions and 34 deletions

8
Vagrantfile vendored
View File

@@ -40,6 +40,10 @@ Vagrant.configure("2") do |config|
d.has_ssh = true
end
if opts[:name].include? "bullseye"
m.vm.provision "shell", inline: "[ -f '/root/first_provision' ] || (apt-get update -qq && apt-get -y dist-upgrade && touch /root/first_provision)"
end
#m.vm.provision "shell", inline: "apt-get update && apt-get install -y python python-apt"
m.vm.provision "ansible" do |ansible|
ansible.playbook = "tests/test.yml"
@@ -59,6 +63,10 @@ Vagrant.configure("2") do |config|
end
m.vm.provision "shell", inline: "apt-get update && apt-get install -y ifupdown python"
if opts[:name].include? "bullseye"
m.vm.provision "shell", inline: "[ -f '/root/first_provision' ] || (apt-get update -qq && apt-get -y dist-upgrade && touch /root/first_provision)"
end
m.vm.provision "ansible" do |ansible|
ansible.playbook = "tests/test.yml"
ansible.verbose = 'vv'

View File

@@ -1,14 +1,5 @@
---
- name: SHELL | Check if we are in multiple PHP distribution
ansible.builtin.shell: set -o pipefail && apt-cache search php xdebug | grep 'php[[:digit:]].[[:digit:]]'
args:
executable: /bin/bash
failed_when: false
changed_when: false
register: multiple_php
when: ansible_os_family == 'Debian'
- name: INCLUDE_VARS | Related to OS family
ansible.builtin.include_vars: "OS_Family_{{ ansible_os_family }}.yml"
@@ -73,7 +64,6 @@
state: present
update_cache: true
cache_valid_time: 3600
install_recommends: false
vars:
pkgs: "{{ php_packages + php_extra_packages | flatten }}"
notify: restart php-fpm

View File

@@ -4,13 +4,11 @@
- name: APT | Install APCu
ansible.builtin.apt:
pkg: "{{ php_apcu_package }}"
install_recommends: false
pkg: "php-apcu"
- name: APT | Install Opcache
ansible.builtin.apt:
pkg: "{{ php_package_prefix }}opcache"
install_recommends: false
when: ansible_os_family == 'Debian'

View File

@@ -8,7 +8,6 @@
state: present
update_cache: true
cache_valid_time: 3600
install_recommends: false
when: ansible_os_family == 'Debian'
- name: PKGNG | Install xdebug

View File

@@ -167,21 +167,3 @@
ansible.builtin.uri:
url: "http://localhost{{ php_fpm_poold.0.status_path }}"
when: php_fpm_poold.0.status_path is defined
- block:
- name: SHELL | Check if we installed multiple PHP versions
ansible.builtin.shell: set -o pipefail && (dpkg -l | grep 'php[[:digit:]].*common' | wc -l)
args:
executable: /bin/bash
failed_when: false
changed_when: false
register: check_multiple_php
- name: FAIL | If we have multiple PHP version
ansible.builtin.fail:
msg: "Multiple PHP versions detected"
when: check_multiple_php.stdout != '1'
when: ansible_os_family == 'Debian'

View File

@@ -7,8 +7,7 @@ php_packages:
- '{{ php_package_prefix }}mysql'
- '{{ php_package_prefix }}intl'
php_xdebug_package: '{% if multiple_php.rc == 0 %}{{ php_package_prefix }}{% else %}php-{% endif %}xdebug'
php_apcu_package: '{% if multiple_php.rc == 0 %}{{ php_package_prefix }}{% else %}php-{% endif %}apcu'
php_xdebug_package: 'php-xdebug'
php_package_prefix: 'php{{ php_version }}-'