2016-03-05 21:46:54 +07:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: APT_REPOSITORY | Install backports
|
2017-10-03 22:57:35 +07:00
|
|
|
apt_repository:
|
|
|
|
repo: 'deb http://httpredir.debian.org/debian {{ ansible_distribution_release }}-backports main'
|
|
|
|
state: present
|
2016-03-05 21:46:54 +07:00
|
|
|
|
2016-08-09 21:02:09 +07:00
|
|
|
- block:
|
2017-06-14 23:00:30 +07:00
|
|
|
|
2016-08-09 21:02:09 +07:00
|
|
|
- name: APT | Install DotDeb key
|
2017-10-03 22:57:35 +07:00
|
|
|
apt_key:
|
|
|
|
url: 'http://www.dotdeb.org/dotdeb.gpg'
|
|
|
|
state: present
|
2017-06-14 23:00:30 +07:00
|
|
|
|
2016-10-13 15:19:24 +07:00
|
|
|
- name: APT_REPOSITORY | Install dotdeb (PHP 7)
|
2017-10-03 22:57:35 +07:00
|
|
|
apt_repository:
|
|
|
|
repo: 'deb http://packages.dotdeb.org {{ ansible_distribution_release }} all'
|
|
|
|
state: present
|
2017-06-14 23:00:30 +07:00
|
|
|
|
2016-08-11 02:29:03 +07:00
|
|
|
- name: LINEFILEFILE | Dotdeb priority (prevent install nginx from dotdeb)
|
2017-10-03 22:57:35 +07:00
|
|
|
copy:
|
|
|
|
content: "Package: *\nPin: release o=packages.dotdeb.org\nPin-Priority: 100"
|
|
|
|
dest: /etc/apt/preferences
|
2017-06-14 23:00:30 +07:00
|
|
|
|
2016-10-13 15:19:24 +07:00
|
|
|
when: ansible_distribution_release == 'jessie' and dotdeb
|
2016-08-09 21:02:09 +07:00
|
|
|
|
2016-03-05 21:46:54 +07:00
|
|
|
- name: APT | Install needed packages
|
2017-10-03 22:57:35 +07:00
|
|
|
apt:
|
|
|
|
pkg: "{{ item }}"
|
|
|
|
update_cache: yes
|
|
|
|
cache_valid_time: 3600
|
|
|
|
state: present
|
2016-03-05 21:46:54 +07:00
|
|
|
with_items:
|
|
|
|
- curl
|
|
|
|
- fcgiwrap
|
2016-08-11 15:48:12 +07:00
|
|
|
- nghttp2
|
2016-10-13 15:19:24 +07:00
|
|
|
- strace
|
|
|
|
- vim
|
|
|
|
|
|
|
|
- name: APT | Install PHP5.6
|
2017-10-03 22:57:35 +07:00
|
|
|
apt:
|
|
|
|
pkg: "{{ item }}"
|
|
|
|
update_cache: yes
|
|
|
|
cache_valid_time: 3600
|
|
|
|
state: present
|
2016-10-13 15:19:24 +07:00
|
|
|
with_items:
|
2016-08-11 15:48:12 +07:00
|
|
|
- php5-fpm
|
2016-08-11 16:30:26 +07:00
|
|
|
- php5-sqlite
|
2016-10-13 15:19:24 +07:00
|
|
|
when: nginx_php56
|
|
|
|
|
|
|
|
- name: APT | Install PHP7
|
2017-10-03 22:57:35 +07:00
|
|
|
apt:
|
|
|
|
pkg: "{{ item }}"
|
|
|
|
update_cache: yes
|
|
|
|
cache_valid_time: 3600
|
|
|
|
state: present
|
2016-10-13 15:19:24 +07:00
|
|
|
with_items:
|
2016-08-11 15:48:12 +07:00
|
|
|
- php7.0-fpm
|
2016-08-11 16:30:26 +07:00
|
|
|
- php7.0-sqlite3
|
2016-10-13 15:19:24 +07:00
|
|
|
when: nginx_php70
|
2016-03-05 21:46:54 +07:00
|
|
|
|
|
|
|
- name: SERVICE | Force start services
|
2017-10-03 22:57:35 +07:00
|
|
|
service:
|
|
|
|
name: "{{ item.name }}"
|
|
|
|
state: started
|
2016-03-05 21:46:54 +07:00
|
|
|
register: sf
|
|
|
|
with_items:
|
2016-10-13 15:19:24 +07:00
|
|
|
- { name: 'php5-fpm', cond: "{{ nginx_php56 }}" }
|
|
|
|
- { name: 'php7.0-fpm', cond: "{{ nginx_php70 }}" }
|
|
|
|
- { name: 'fcgiwrap', cond: true }
|
2017-06-14 22:54:48 +07:00
|
|
|
when: item.cond
|