ansible-nginx/tests/includes/pre_Debian.yml

77 lines
1.8 KiB
YAML
Raw Normal View History

---
- 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
when: nginx_backports
- block:
- name: APT | Install DotDeb key
2017-10-03 22:57:35 +07:00
apt_key:
url: 'http://www.dotdeb.org/dotdeb.gpg'
state: present
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
- 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
when: ansible_distribution_release == 'jessie' and dotdeb | default(false)
- block:
- name: APT | Install apt-transport-https
apt:
pkg: apt-transport-https
update_cache: yes
cache_valid_time: 3600
- name: APT_KEY | Install GPG key
apt_key:
url: 'https://packages.sury.org/php/apt.gpg'
- name: APT_REPOSITORY | Add APT repository
apt_repository:
repo: 'deb https://packages.sury.org/php {{ ansible_distribution_release }} main'
when: sury | default(false)
- 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
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 PHP
2017-10-03 22:57:35 +07:00
apt:
pkg: "{{ item.version | php_fpm_package }}"
2017-10-03 22:57:35 +07:00
update_cache: yes
cache_valid_time: 3600
state: present
with_items: "{{ nginx_php }}"
2016-10-13 15:19:24 +07:00
- name: SERVICE | Force start fcgiwrap
service:
name: "fcgiwrap"
state: started
- name: SERVICE | Force start PHP
2017-10-03 22:57:35 +07:00
service:
name: "{{ item.version | php_fpm_service }}"
2017-10-03 22:57:35 +07:00
state: started
with_items: "{{ nginx_php }}"