Merge pull request #277 from kindlehl/php_packages_extra_fix

Php_packages_extra fix
This commit is contained in:
Jeff Geerling 2020-03-06 12:42:14 -06:00 committed by GitHub
commit c4bd34bf81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 7 deletions

View File

@ -3,6 +3,9 @@
# for RHEL/CentOS. # for RHEL/CentOS.
php_enablerepo: "" php_enablerepo: ""
# No extra packages are installed by default
php_packages_extra: []
# Default PHP version to install on Debian-based OSes. # Default PHP version to install on Debian-based OSes.
php_default_version_debian: "7.0" php_default_version_debian: "7.0"

View File

@ -8,11 +8,6 @@
php_packages: "{{ __php_packages | list }}" php_packages: "{{ __php_packages | list }}"
when: php_packages is not defined when: php_packages is not defined
- name: Define extra php_packages.
set_fact:
php_packages: "{{ php_packages | list + php_packages_extra | list }}"
when: php_packages_extra is defined
- name: Define php_webserver_daemon. - name: Define php_webserver_daemon.
set_fact: set_fact:
php_webserver_daemon: "{{ __php_webserver_daemon }}" php_webserver_daemon: "{{ __php_webserver_daemon }}"

View File

@ -4,7 +4,7 @@
- name: Ensure PHP packages are installed. - name: Ensure PHP packages are installed.
apt: apt:
name: "{{ php_packages }}" name: "{{ php_packages + php_packages_extra }}"
state: "{{ php_packages_state }}" state: "{{ php_packages_state }}"
install_recommends: "{{ php_install_recommends }}" install_recommends: "{{ php_install_recommends }}"
register: php_package_install register: php_package_install

View File

@ -1,7 +1,7 @@
--- ---
- name: Ensure PHP packages are installed. - name: Ensure PHP packages are installed.
package: package:
name: "{{ php_packages }}" name: "{{ php_packages + php_packages_extra }}"
state: "{{ php_packages_state }}" state: "{{ php_packages_state }}"
enablerepo: "{{ php_enablerepo | default(omit, true) }}" enablerepo: "{{ php_enablerepo | default(omit, true) }}"
notify: restart webserver notify: restart webserver