geerlingguy / ansible-role-drupal

Ansible Role - Drupal
https://galaxy.ansible.com/geerlingguy/drupal/
MIT License
92 stars 51 forks source link

setting drupal_core_owner and drupal_core_owner_become causes my playbook to fail #82

Closed huntertj closed 3 years ago

huntertj commented 4 years ago

Description

When I use drupal_core_owner and drupal_core_owner_become the playbook fails on Install dependencies with composer require (this may take a while). with unable to write composer.json

Steps to Reproduce

Set drupal_core_owner to something other then the user running the playbook, set drupal_core_owner_become to true run the playbook

Actual Behavior

task fail with permission issues

Expected Behavior

Expected the playbook to complete and utilize drupal_core_owner as needed

Screenshots

If applicable, add screenshots to help explain your problem.

Notes

adding to roles/geerlingguy.drupal/tasks/build-composer-project.yml fixes this for me

- name: Install dependencies with composer require (this may take a while).
  composer:
    command: require
    arguments: "{{ item }}"
    working_dir: "{{ drupal_composer_install_dir }}"
  with_items: "{{ drupal_composer_dependencies|default([]) }}"
  become: "{{ drupal_core_owner_become }}"
  become_user: "{{ drupal_core_owner }}"
stale[bot] commented 3 years ago

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

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

stale[bot] commented 3 years ago

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