mirror of
https://github.com/geerlingguy/ansible-role-php-versions.git
synced 2025-03-12 13:19:18 +01:00
Issue #94: Try to get new deb822_repository task to work properly.
This commit is contained in:
parent
26cba968b8
commit
b09afd41d1
@ -8,7 +8,7 @@ galaxy_info:
|
||||
company: "Midwestern Mac, LLC"
|
||||
license: "MIT"
|
||||
issue_tracker_url: https://github.com/geerlingguy/ansible-role-php-versions/issues
|
||||
min_ansible_version: 2.10
|
||||
min_ansible_version: 2.15
|
||||
platforms:
|
||||
- name: Debian
|
||||
versions:
|
||||
|
@ -11,10 +11,11 @@
|
||||
- python3-debian
|
||||
state: present
|
||||
|
||||
# Huge thanks to https://www.jeffgeerling.com/comment/34112#comment-34112
|
||||
- name: Make API request to Launchpad
|
||||
uri:
|
||||
url: "https://api.launchpad.net/devel/~ondrej/+archive/ubuntu/php"
|
||||
return_content: yes
|
||||
return_content: true
|
||||
method: GET
|
||||
headers:
|
||||
Accept: "application/json"
|
||||
@ -24,6 +25,13 @@
|
||||
ansible.builtin.set_fact:
|
||||
signing_key_fingerprint: "{{ launchpad_response.json.signing_key_fingerprint }}"
|
||||
|
||||
- name: Retrieve ASCII representation of the key using the signing key fingerprint
|
||||
uri:
|
||||
url: "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x{{ signing_key_fingerprint }}"
|
||||
return_content: true
|
||||
method: GET
|
||||
register: keyserver_response
|
||||
|
||||
- name: Add Ondrej's PHP PPA
|
||||
become: true
|
||||
ansible.builtin.deb822_repository:
|
||||
@ -33,14 +41,14 @@
|
||||
uris: [https://ppa.launchpadcontent.net/ondrej/php/ubuntu]
|
||||
suites: ["{{ ansible_facts['distribution_release'] }}"]
|
||||
components: [main]
|
||||
signed_by: "{{ signing_key_fingerprint }}"
|
||||
signed_by: "{{ keyserver_response.content }}"
|
||||
register: php_ondrej_debian_repo
|
||||
|
||||
- name: Update apt caches after repo is added (Debian).
|
||||
- name: Update apt caches after repo is added.
|
||||
apt: update_cache=true
|
||||
when:
|
||||
- php_ondrej_debian_repo.changed
|
||||
- ansible_distribution == "Debian"
|
||||
- ansible_os_family == "Debian"
|
||||
tags: ['skip_ansible_lint']
|
||||
|
||||
- name: Purge PHP version packages (besides the currently chosen php_version).
|
||||
|
Loading…
Reference in New Issue
Block a user