Update to PHP 7.1.

This commit is contained in:
Buster Silver 2017-04-30 14:17:07 -05:00
parent 8546d7e7b1
commit 340ed85f40
4 changed files with 36 additions and 30 deletions

View File

@ -32,4 +32,4 @@ if [ $APP_ENV = "production" ]; then
git reset --hard && git pull
fi
ansible-playbook util/ansible/update.yml --inventory=util/ansible/hosts --extra-vars "app_env=$APP_ENV update_revision=2"
ansible-playbook util/ansible/update.yml --inventory=util/ansible/hosts --extra-vars "app_env=$APP_ENV update_revision=3"

View File

@ -1,3 +1,3 @@
---
- name: restart php-fpm
service: name=php7.0-fpm enabled=yes state=restarted
service: name=php7.1-fpm enabled=yes state=restarted

View File

@ -5,22 +5,38 @@
register: installed_php_ppa
# when: ansible_distribution == 'Ubuntu' and ansible_distribution_release == 'trusty'
# - name: Add Phalcon PPA repository
# become: true
# register: installed_phalcon_ppa
# shell: curl -s https://packagecloud.io/install/repositories/phalcon/stable/script.deb.sh | sudo bash
# args:
# creates: /etc/apt/sources.list.d/phalcon_stable.list
# warn: no
- name: Update apt again
become: true
apt: update_cache=yes
when: installed_php_ppa.changed
- name: Install PHP Libraries
- name: Remove Old PHP Libraries
become: true
apt: package="{{ item }}" state=absent
with_items:
- php5-common
- php5-fpm
- php5-cli
- php5-phalcon
- php7.0-phalcon
- name: Install PHP 7.1
become: true
apt: package="{{ item }}" state=latest
with_items:
- php7.1-fpm
- php7.1-cli
- php7.1-gd
- php7.1-curl
- php7.1-xml # IceCast XML config
- php7.1-zip # Composer installs
- php7.1-mysqlnd # MySQL Native Driver (Doctrine)
- php7.1-mbstring # Codeception Tests
- php7.1-intl # Localization
- name: Remove PHP 7.0
become: true
apt: package="{{ item }}" state=absent
with_items:
- php7.0-fpm
- php7.0-cli
@ -41,23 +57,13 @@
locale_gen: name="{{ item }}" state=present
with_items: "{{ locale_list.stdout_lines }}"
- name: Remove Old PHP Libraries
become: true
apt: package="{{ item }}" state=absent
with_items:
- php5-common
- php5-fpm
- php5-cli
- php5-phalcon
- php7.0-phalcon
- name: Configure PHP FPM Pool
template: src=fpmpool.j2 dest=/etc/php/7.0/fpm/pool.d/www.conf force=true
template: src=fpmpool.j2 dest=/etc/php/7.1/fpm/pool.d/www.conf force=true
notify: restart php-fpm
- name: Configure php-fpm php.ini
ini_file:
dest: /etc/php/7.0/fpm/php.ini
dest: /etc/php/7.1/fpm/php.ini
section: PHP
option: "{{ item.option }}"
value: "{{ item.value }}"
@ -69,7 +75,7 @@
- name: Configure php-cli php.ini
ini_file:
dest: /etc/php/7.0/cli/php.ini
dest: /etc/php/7.1/cli/php.ini
section: PHP
option: "{{ item.option }}"
value: "{{ item.value }}"

View File

@ -13,10 +13,10 @@
roles:
- init
- azuracast-config
- { role: azuracast-radio, when: update_revision < 2 }
- { role: nginx, when: update_revision < 2 }
- { role: php, when: update_revision < 2 }
- { role: influxdb, when: update_revision < 2 }
- { role: supervisord, when: update_revision < 2 }
- { role: azuracast-cron, when: update_revision < 2 }
- { role: azuracast-radio, when: update_revision|int < 2 }
- { role: nginx, when: update_revision|int < 2 }
- { role: php, when: update_revision|int < 3 }
- { role: influxdb, when: update_revision|int < 2 }
- { role: supervisord, when: update_revision|int < 2 }
- { role: azuracast-cron, when: update_revision|int < 2 }
- azuracast-update