hashbangcode / vlad

Vlad - Vagrant LAMP Ansible Drupal
173 stars 53 forks source link

#186 Enter apache2_docroot, aware of OS family and distribution. #187

Closed mbarcia closed 9 years ago

mbarcia commented 9 years ago

For a clearer organization of the projects, this

  1. adds OS-dependent variables (_apache2docroot, _apacheuser and _apachegroup) to conform to the OS standards
  2. renames /var/www/site/docroot to {{ apache2_docroot }}/drupal

To mimic the value in Ansible, it also introduces a new variable to Vagrantfile (_apache2docroot).

It replaces all occurrences of /var/www, /var/www/site, /var/www/site/docroot throughout the code, with the aforementioned new variables.

Interestingly enough, this opens the door for reducing code duplication of the _debian.yml and _redhat.yml tasks files. It does so by using conditionals on ansible facts.

philipnorton42 commented 9 years ago

I'm going to reject this pull request for one specific reason. This reason is that Apache is not always going to be the only web server used.

I have deliberately not made any reference to the type of web server in the Vlad configuration files, and where a web server is referenced it is only through variables like webserver_hostname or http_port. The idea was to allow a more easy integration with nginx.

Granted, there will still be lots of changes brought about via this change, but these can more easily be done with a generic variable.