From 6881f705174c3884d18160fe7230425804dd8ca5 Mon Sep 17 00:00:00 2001 From: Emilien Mantel Date: Wed, 1 Sep 2021 09:33:16 +0200 Subject: [PATCH] Fix pkgng calls --- .travis.yml | 1 + README.md | 4 +++- tasks/main.yml | 2 +- tasks/opcache.yml | 4 ++-- tasks/xdebug.yml | 4 ++-- tests/includes/pre_FreeBSD.yml | 2 +- 6 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 21d67cc..39f767f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,6 +33,7 @@ before_install: install: - sudo pip install "ansible-core$ANSIBLE_VERSION" - sudo pip install ansible-lint + - ansible-galaxy collection install community.general script: - VAGRANT_DEFAULT_PROVIDER=docker vagrant up $PLATFORM diff --git a/README.md b/README.md index 148481b..d932802 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,9 @@ Links: Requirements ------------ -If you need PHP-FPM, you must install a webserver with FastCGI support. You can use my [nginx role](https://github.com/HanXHX/ansible-nginx). +- Ansible >= 2.11 +- Collections: [community.general](https://galaxy.ansible.com/community/general) +- If you need PHP-FPM, you must install a webserver with FastCGI support. You can use my [nginx role](https://github.com/HanXHX/ansible-nginx). FreeBSD limitations ------------------- diff --git a/tasks/main.yml b/tasks/main.yml index 1a945e2..dd84889 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -71,7 +71,7 @@ when: ansible_os_family == 'Debian' - name: PKGNG | Install PHP packages - ansible.builtin.pkgng: + community.general.pkgng: name: "{{ php_packages + php_extra_packages | flatten | join(',') }}" notify: restart php-fpm when: ansible_os_family == 'FreeBSD' diff --git a/tasks/opcache.yml b/tasks/opcache.yml index 0e12592..5affb23 100644 --- a/tasks/opcache.yml +++ b/tasks/opcache.yml @@ -15,11 +15,11 @@ - block: - name: PKGNG | Install APCu - ansible.builtin.pkgng: + community.general.pkgng: name: "php{{ php_version | replace('.', '') }}-pecl-APCu" - name: PKGNG | Install Opcache - ansible.builtin.pkgng: + community.general.pkgng: name: "{{ php_package_prefix }}opcache" when: ansible_os_family == 'FreeBSD' diff --git a/tasks/xdebug.yml b/tasks/xdebug.yml index baf1f3b..96eac5f 100644 --- a/tasks/xdebug.yml +++ b/tasks/xdebug.yml @@ -11,7 +11,7 @@ when: ansible_os_family == 'Debian' - name: PKGNG | Install xdebug - ansible.builtin.pkgng: + community.general.pkgng: name: "{{ php_xdebug_package }}" when: ansible_os_family == 'FreeBSD' and php_xdebug_package is defined @@ -34,7 +34,7 @@ when: ansible_os_family == 'Debian' - name: PKGNG | Uninstall xdebug - ansible.builtin.pkgng: + community.general.pkgng: name: "{{ php_xdebug_package }}" state: absent when: ansible_os_family == 'FreeBSD' diff --git a/tests/includes/pre_FreeBSD.yml b/tests/includes/pre_FreeBSD.yml index c0a487c..f4bf1bd 100644 --- a/tests/includes/pre_FreeBSD.yml +++ b/tests/includes/pre_FreeBSD.yml @@ -6,5 +6,5 @@ php_xdebug_package: 'php72-pecl-xdebug-2.6.1' - name: PKGNG | Install packages - ansible.builtin.pkgng: + community.general.pkgng: name: ['curl', 'nginx']