ansible-collection-nextcloud/roles/php/tasks/install.yml
2023-03-26 01:47:50 +01:00

35 lines
966 B
YAML

---
- name: Add packages.sury.org key
ansible.builtin.apt_key:
url: https://packages.sury.org/php/apt.gpg
keyring: /etc/apt/trusted.gpg.d/packages.sury.org-php.gpg
when: php_use_sury_repo
- name: Add packages.sury.org
ansible.builtin.apt_repository:
filename: packages.sury.org-php.list
repo: "deb https://packages.sury.org/php/ {{ ansible_facts.distribution_release }} main"
state: "{{ php_use_sury_repo | ternary('present', 'absent') }}"
- name: Install dependencies
ansible.builtin.apt:
name:
- "imagemagick"
- "{{ php }}"
- "{{ php }}-fpm"
- "{{ php }}-cli"
- "{{ php }}-bcmath"
- "{{ php }}-bz2"
- "{{ php }}-curl"
- "{{ php }}-gd"
- "{{ php }}-gmp"
- "{{ php }}-imagick"
- "{{ php }}-intl"
- "{{ php }}-mbstring"
- "{{ php }}-mysql"
- "{{ php }}-redis"
- "{{ php }}-xml"
- "{{ php }}-zip"
vars:
php: "php{{ php_version }}"