geerlingguy / ansible-role-php-versions

Ansible Role - PHP Versions
https://galaxy.ansible.com/geerlingguy/php-versions/
MIT License
98 stars 73 forks source link

correctly consider php_packages variable when using with geerlingguy.php #39

Closed aft2d closed 4 years ago

aft2d commented 5 years ago

If php_packages is set on task level like

block:

  • include_role: name: php-versions
  • include_role: name: geerlingguy.php vars: php_version: "7.3" php_versions_install_recommends: false php_enable_webserver: false php_packages_state: "present" php_install_recommends: false php_enable_php_fpm: false php_enable_apc: false php_packages:
  • php7.3-common
  • php7.3-cli
  • php7.3-zip
  • php7.3-curl
  • php7.3-mbstring

or in a var file etc. the module overwrites php_packages which is used in the geerlingguy.php role.

This PR checks if the variable is set in general and not only on the host level.

webarchitect609 commented 4 years ago

@aft2d, thank you for this fix! I used it in my fork webarchitect609.php_versions. Please, feel free to use, if you still need it.

stale[bot] commented 4 years ago

This pull request has been marked 'stale' due to lack of recent activity. If there is no further activity, the PR will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark pull requests as stale.

stale[bot] commented 4 years ago

This pull request has been closed due to inactivity. If you feel this is in error, please reopen the pull request or file a new PR with the relevant details.