Make sure dirmngr is present on Ubuntu.

This commit is contained in:
Jeff Geerling 2023-06-30 01:20:46 -05:00
parent d39a057c03
commit 94cab5d78a
1 changed files with 12 additions and 4 deletions

View File

@ -17,13 +17,16 @@
pre_tasks:
- name: Update apt cache.
apt: update_cache=true cache_valid_time=600
apt:
update_cache: true
cache_valid_time: 600
when: ansible_os_family == 'Debian'
changed_when: false
- name: Add repository for PHP 8.
apt_repository: repo='ppa:ondrej/php'
when: ansible_distribution == 'Ubuntu'
- name: Ensure dirmngr is installed (gnupg dependency).
apt:
name: dirmngr
state: present
# Debian-specific tasks.
- name: Add dependencies for PHP versions (Debian).
@ -35,6 +38,11 @@
state: present
when: ansible_distribution == "Debian"
- name: Add Ondrej Sury's repo for PHP 8 (Ubuntu).
apt_repository:
repo: 'ppa:ondrej/php'
when: ansible_distribution == 'Ubuntu'
- name: Add Ondrej Sury's apt key (Debian).
apt_key:
url: https://packages.sury.org/php/apt.gpg