Skip to content

Commit c4b485c

Browse files
committed
Attempt to get Debian working too. Issue #94.
1 parent b334b49 commit c4b485c

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

tasks/setup-Debian.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,23 @@
3232
method: GET
3333
register: keyserver_response
3434

35-
- name: Add Ondrej's PHP PPA
35+
- name: Set URI for Ondrej's repo (Ubuntu).
36+
ansible.builtin.set_fact:
37+
ondrej_repo_uri: https://ppa.launchpadcontent.net/ondrej/php/ubuntu
38+
when: ansible_distribution == "Ubuntu"
39+
40+
- name: Set URI for Ondrej's repo (Debian).
41+
ansible.builtin.set_fact:
42+
ondrej_repo_uri: https://packages.sury.org/php/dists/bullseye/
43+
when: ansible_distribution == "Debian"
44+
45+
- name: Add Ondrej's PHP repo.
3646
become: true
3747
ansible.builtin.deb822_repository:
3848
state: present
3949
name: "ondrej-php-{{ ansible_distribution_release }}"
4050
types: [deb]
41-
uris: [https://ppa.launchpadcontent.net/ondrej/php/ubuntu]
51+
uris: ["{{ ondrej_repo_uri }}"]
4252
suites: ["{{ ansible_facts['distribution_release'] }}"]
4353
components: [main]
4454
signed_by: "{{ keyserver_response.content }}"

0 commit comments

Comments
 (0)