use other methods

This commit is contained in:
2026-01-26 15:14:18 +01:00
parent 007488952d
commit ddb1b1adac

View File

@@ -6,24 +6,22 @@
- apt-transport-https
- software-properties-common
- lsb-release
- ca-certificates
when: ansible_facts['distribution'] in ["Debian", "Ubuntu", "Linux Mint"]
- name: webservers | nextcloud | prereq | get php repo key
ansible.builtin.uri:
ansible.builtin.get_url:
url: "https://packages.sury.org/php/apt.gpg"
dest: "/etc/apt/trusted.gpg.d/php.gpg"
dest: "/usr/share/keyrings/php-sury.gpg"
mode: '0644'
- name: webservers | nextcloud | prereq | add php repo
ansible.builtin.lineinfile:
path: "/etc/apt/sources.list.d/php.list"
ansible.builtin.apt_repository:
repo: "deb [signed-by=/usr/share/keyrings/php-sury.gpg] https://packages.sury.org/php/ {{ ansible_facts['distribution_release'] | lower }} main"
state: present
line: "deb https://packages.sury.org/php/ {{ ansible_facts['distribution_release'] | lower }} main"
create: True
filename: php-sury
update_cache: true
- name: webservers | nextcloud | prereq | install php
ansible.builtin.package:
state: latest
name: "{{ item.package }}"
update_cache: True
with_items: "{{ nextcloud_php_packages }}"
name: "{{ nextcloud_php_packages | map(attribute='package') | list }}"