replace apt_repository with shell module

apt_repository use deprecated apt-key
This commit is contained in:
Oli
2023-02-28 01:52:50 +00:00
parent 34f3c54ceb
commit b9af96fbbe
2 changed files with 3 additions and 5 deletions

View File

@@ -1,9 +1,8 @@
---
- name: Add Sury PHP Repository
apt_repository:
repo: ppa:ondrej/php
state: present
update_cache: true
shell: add-apt-repository -y ppa:ondrej/php
args:
creates: "/etc/apt/sources.list.d/ondrej-ubuntu-php-jammy.list"
when: php_version is defined # add repo when version is specified, otherwise use default repo
- name: "Uninstall old PHP version"