Prepare apt sury repo

This commit is contained in:
Dryusdan 2021-07-06 09:33:19 +02:00
parent 1899b3c911
commit 23c9b66b29
1 changed files with 29 additions and 0 deletions

View File

@ -1,5 +1,34 @@
---
block:
- name: Add Sury repo on Stretch
ansible.builtin.apt_repository:
repo: "deb https://packages.sury.org/php/ stretch main"
state: present
filename: php-sury
when: ansible_distribution_major_version == 9
- name: Add Sury repo on Buster
ansible.builtin.apt_repository:
repo: "deb https://packages.sury.org/php/ buster main"
state: present
filename: php-sury
when: ansible_distribution_major_version == 10
- name: Add Sury repo on Stretch
ansible.builtin.apt_repository:
repo: "deb https://packages.sury.org/php/ bulleyes main"
state: present
filename: php-sury
when: ansible_distribution_major_version == 11
- name: Add Sury apt signing key
ansible.builtin.apt_key:
url: https://packages.sury.org/php/apt.gpg
state: present
when: phpsury is defined and phpsury is True
- name: PHP already installed ?
shell: "dpkg-query -W 'php{{ php_version }}-fpm'"
ignore_errors: true