Closed sbubaron closed 8 years ago
You need to add on to the php_packages
—what is happening here is your local.yml
file is only installing php7.0-mcrypt
and it's dependencies, which don't include fpm
:
php_packages:
- php7.0-mcrypt
So you should update that variable in your config.yml
to be:
php_packages:
- php7.0-common
- php7.0-cli
- php7.0-dev
- php7.0-fpm
- libpcre3-dev
- php7.0-gd
- php7.0-curl
- php7.0-imap
- php7.0-json
- php7.0-opcache
- php7.0-xml
- php7.0-mbstring
- php-sqlite3
- php-apcu
- php7.0-mcrypt
Okay, that fixed it, but I'm confused as to why it was required? Those packages aren't mentioned anywhere in the default.config.yml -- I guess I assumed that by having
php_enable_php_fpm: true
Any required packages would have been loaded? Does the fact that I specified an additional package end up overriding something down the chain?
@sbubaron - Yeah; the way the variable precedence works, any variable you set in local.config.yml or config.yml will completely override the same variable in the default config. So if you set php_packages
, you have to make sure you include all packages you want installed.
Some have requested the ability to have list variables append rather than overwrite, but that adds a lot of complexity to the way variable overrides are treated, and I'd rather keep it simple and just do full variable overrides.
@geerlingguy thanks Jeff! That does answer a few other thoughts/questions that have been bouncing around in my head -- however I'm still unsure, where was php_packages previously defined. I imagine its coming from a repo/config file in another project that Drupal-VM uses?
@sbubaron - It's in the geerlingguy.php
role, in the vars
section—it's a funny variable, because it's platform-specific, so there are defaults for RHEL and Debian, and you can override at any level up from there. See: https://github.com/geerlingguy/ansible-role-php#role-variables
When attempting to vagrant up or provision I am getting this issue:
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "Error when trying to enable php7.0-fpm: rc=1 Failed to execute operation: No such file or directory\n"}
I have included my yml files below