2016-03-05 21:46:54 +07:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: APT_REPOSITORY | Install backports
|
|
|
|
apt_repository: repo='deb http://httpredir.debian.org/debian {{ ansible_distribution_release }}-backports main' state=present
|
|
|
|
|
2016-08-09 21:02:09 +07:00
|
|
|
- block:
|
|
|
|
- name: APT | Install DotDeb key
|
|
|
|
apt_key: url='http://www.dotdeb.org/dotdeb.gpg' state=present
|
|
|
|
- name: APT_REPOSITORY | Install dotdeb (PHP 7)
|
|
|
|
apt_repository: repo='deb http://packages.dotdeb.org {{ ansible_distribution_release }} all' state=present
|
2016-08-11 02:29:03 +07:00
|
|
|
- name: LINEFILEFILE | Dotdeb priority (prevent install nginx from dotdeb)
|
|
|
|
copy: >
|
|
|
|
content="Package: *\nPin: release o=packages.dotdeb.org\nPin-Priority: 100"
|
|
|
|
dest=/etc/apt/preferences
|
2016-08-09 21:02:09 +07:00
|
|
|
when: ansible_distribution_release == 'jessie'
|
|
|
|
|
2016-03-05 21:46:54 +07:00
|
|
|
- name: APT | Install needed packages
|
|
|
|
apt: pkg={{ item }} update_cache=yes cache_valid_time=3600 state=present
|
|
|
|
with_items:
|
|
|
|
- php5-fpm
|
2016-08-09 21:02:09 +07:00
|
|
|
- php7.0-fpm
|
2016-03-05 21:46:54 +07:00
|
|
|
- curl
|
|
|
|
- fcgiwrap
|
2016-03-09 21:03:41 +07:00
|
|
|
|
|
|
|
- name: APT | Install nghttp2
|
|
|
|
apt: pkg=nghttp2 state=present
|
|
|
|
when: ansible_distribution_major_version | version_compare(8, 'ge')
|
2016-03-05 21:46:54 +07:00
|
|
|
|
|
|
|
- name: SERVICE | Force start services
|
|
|
|
service: name={{ item }} state=started
|
|
|
|
register: sf
|
|
|
|
with_items:
|
|
|
|
- php5-fpm
|
2016-08-09 21:02:09 +07:00
|
|
|
- php7.0-fpm
|
2016-03-05 21:46:54 +07:00
|
|
|
- fcgiwrap
|