Skip to content

Commit 14b1c40

Browse files
committed
Issue #94: Regex saves the day. Yay.
1 parent 088500f commit 14b1c40

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tasks/setup-Debian.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,19 @@
3535
- name: Set data for Ondrej's repo (Ubuntu).
3636
ansible.builtin.set_fact:
3737
ondrej_repo_uri: "https://ppa.launchpadcontent.net/ondrej/php/ubuntu"
38-
ondrej_repo_signed_by: "{{ keyserver_response.content }}"
38+
# Remove 'Comment' because response can be out of order.
39+
# See: https://github.com/geerlingguy/ansible-role-php-versions/issues/94
40+
ondrej_repo_signed_by: "{{ keyserver_response.content | regex_replace('\nComment.+\n','\n') }}"
3941
when: ansible_distribution == "Ubuntu"
4042

43+
- debug: var=ondrej_repo_signed_by
44+
4145
- name: Set data for Ondrej's repo (Debian).
4246
ansible.builtin.set_fact:
4347
ondrej_repo_uri: "https://packages.sury.org/php"
4448
ondrej_repo_signed_by: "https://packages.sury.org/php/apt.gpg"
4549
when: ansible_distribution == "Debian"
4650

47-
- debug: var=ondrej_repo_signed_by
48-
4951
- name: Add Ondrej's PHP repo.
5052
become: true
5153
ansible.builtin.deb822_repository:

0 commit comments

Comments
 (0)