From 24f0998f7fb12df194468e5bd414d2bea533f282 Mon Sep 17 00:00:00 2001 From: Ivanner Mora Date: Thu, 9 Feb 2017 16:58:10 -0600 Subject: [PATCH] Fix apache user/group --- .../provisioning/roles/vhost/tasks/main.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/conf/vagrant/provisioning/roles/vhost/tasks/main.yml b/conf/vagrant/provisioning/roles/vhost/tasks/main.yml index 4ef012f..2134360 100644 --- a/conf/vagrant/provisioning/roles/vhost/tasks/main.yml +++ b/conf/vagrant/provisioning/roles/vhost/tasks/main.yml @@ -15,6 +15,20 @@ when: drupal8_vhost_exists.stat.exists == False tags: vhost +- name: Replace apache user + become: true + lineinfile: dest=/etc/apache2/envvars + regexp='export APACHE_RUN_USER=www-data' line='export APACHE_RUN_USER=vagrant' + state=present + tags: vhost + +- name: Replace apache group + become: true + lineinfile: dest=/etc/apache2/envvars + regexp='export APACHE_RUN_GROUP=www-data' line='export APACHE_RUN_GROUP=vagrant' + state=present + tags: vhost + - name: Restart Apache become: true service: name=apache2 state=restarted