mirror of
https://github.com/geerlingguy/ansible-role-php-versions.git
synced 2025-04-09 19:06:10 +02: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"
|
company: "Midwestern Mac, LLC"
|
||||||
license: "MIT"
|
license: "MIT"
|
||||||
issue_tracker_url: https://github.com/geerlingguy/ansible-role-php-versions/issues
|
issue_tracker_url: https://github.com/geerlingguy/ansible-role-php-versions/issues
|
||||||
min_ansible_version: 2.10
|
min_ansible_version: 2.15
|
||||||
platforms:
|
platforms:
|
||||||
- name: Debian
|
- name: Debian
|
||||||
versions:
|
versions:
|
||||||
|
@ -11,10 +11,11 @@
|
|||||||
- python3-debian
|
- python3-debian
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
|
# Huge thanks to https://www.jeffgeerling.com/comment/34112#comment-34112
|
||||||
- name: Make API request to Launchpad
|
- name: Make API request to Launchpad
|
||||||
uri:
|
uri:
|
||||||
url: "https://api.launchpad.net/devel/~ondrej/+archive/ubuntu/php"
|
url: "https://api.launchpad.net/devel/~ondrej/+archive/ubuntu/php"
|
||||||
return_content: yes
|
return_content: true
|
||||||
method: GET
|
method: GET
|
||||||
headers:
|
headers:
|
||||||
Accept: "application/json"
|
Accept: "application/json"
|
||||||
@ -24,6 +25,13 @@
|
|||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
signing_key_fingerprint: "{{ launchpad_response.json.signing_key_fingerprint }}"
|
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
|
- name: Add Ondrej's PHP PPA
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.deb822_repository:
|
ansible.builtin.deb822_repository:
|
||||||
@ -33,14 +41,14 @@
|
|||||||
uris: [https://ppa.launchpadcontent.net/ondrej/php/ubuntu]
|
uris: [https://ppa.launchpadcontent.net/ondrej/php/ubuntu]
|
||||||
suites: ["{{ ansible_facts['distribution_release'] }}"]
|
suites: ["{{ ansible_facts['distribution_release'] }}"]
|
||||||
components: [main]
|
components: [main]
|
||||||
signed_by: "{{ signing_key_fingerprint }}"
|
signed_by: "{{ keyserver_response.content }}"
|
||||||
register: php_ondrej_debian_repo
|
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
|
apt: update_cache=true
|
||||||
when:
|
when:
|
||||||
- php_ondrej_debian_repo.changed
|
- php_ondrej_debian_repo.changed
|
||||||
- ansible_distribution == "Debian"
|
- ansible_os_family == "Debian"
|
||||||
tags: ['skip_ansible_lint']
|
tags: ['skip_ansible_lint']
|
||||||
|
|
||||||
- name: Purge PHP version packages (besides the currently chosen php_version).
|
- name: Purge PHP version packages (besides the currently chosen php_version).
|
||||||
|
Loading…
Reference in New Issue
Block a user