Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

How to prevent drupal-vm from running composer install? #1500

Closed
Graloth opened this issue Aug 3, 2017 · 2 comments
Closed

How to prevent drupal-vm from running composer install? #1500

Graloth opened this issue Aug 3, 2017 · 2 comments

Comments

@Graloth
Copy link

Graloth commented Aug 3, 2017

Issue Type

  • Bug Report / Support Request

Your Environment

Vagrant 1.9.5
bash: vboxmanage: command not found
VirtualBox
bash: ansible: command not found

Your OS

  • Windows (10, build 15063.483, version 1703)

Full console output

TASK [geerlingguy.drupal : Run composer install if composer.json is present.] ***

Summary

I am using the Git Deploy functionality of Drupal VM, my config is as follows:

drupal_build_makefile: false
drupal_build_composer: false
drupal_build_composer_project: false
drupal_install_site: false

drupal_deploy: true
drupal_deploy_repo: "-removed for privacy-"
drupal_deploy_dir: "{{ drupal_composer_install_dir }}"
drupal_deploy_version: master
drupal_deploy_accept_hostkey: yes

The repository it is deploying from does contain a composer.json file, but I don't want it to run composer install, as that would cause errors (still working on getting our current composer base project up to snuff). I just want it to get the files from the repo, to the deploy directory, so that I can run composer install myself later.

I have scoured the docs for any information on this, but found none.
Any help is greatly appreciated.

@geerlingguy
Copy link
Owner

This is happening because currently, in the geerlingguy.drupal role, it's assumed that if there's a composer.json, and the codebase is being deployed via Git (drupal_deploy: true), then composer install should be run.

See: https://github.com/geerlingguy/ansible-role-drupal/blob/master/tasks/deploy.yml#L23-L32

@Graloth - could you open an issue in the upstream repository (https://github.com/geerlingguy/ansible-role-drupal/issues/new) requesting the ability to disable the composer install during deployment? I can think of other use cases where people would not want composer install run after new code is deployed, so it's probably as simple as adding an option like drupal_composer_install_after_deploy, and you could set that as no.

@oxyc
Copy link
Collaborator

oxyc commented Sep 23, 2017

This is now fixed upstream if you add the following variable to your config.yml:

drupal_deploy_composer_install: no

@oxyc oxyc closed this as completed Sep 23, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants