WP-CLI Packages not being installed during remote provision

Having an issue implementing this in (latest) trellis for remote servers. I overwrote wp_cli_packages in group_vars/all/main.yml and it works on development but not production.

group_vars/all/main.yml

wp_cli_packages:
  - aaemnnosttv/wp-cli-login-command

Then provisioned both development and remote environments.

Development Server
wp @dev package list - Shows the login package
wp @dev login create username - works

Remote server:
wp @prod package list - Package not shown
wp @prod login create username - get error: “login is not a registered wp command”

In the trellis terminal output during a provision it lists the package seemingly correctly under the Install WP-CLI packages task.

For now I just ran wp package install aaemnnosttv/wp-cli-login-command on the remote server, but am still curious why it doesn’t work after a provision.

Is there a step to get this working on a remote provision that I’m missing?

Am using Trellis that was cloned from master after June 3rd, 2018

will try a fresh clone and change only this and the bare minimum defaults to confirm this later tonight. (i suspect it will work and the cause is some other thing I did)

Ok i did a fresh clone, only changed the bare essentials in order to run this test, and I got the same results.

Development:


Production:
59%20PM

Remote Provision shows that it installed:

TASK [wp-cli : Install WP-CLI packages] **************************************************************
changed: [----] => (item=aaemnnosttv/wp-cli-login-command)

I do believe I’ve encountered this issue in the past. I wasn’t able to come up with a solution then other than manually installing it on the remote server.

1 Like