Merge branch 'provision-dewey' into 'master'

Provision Clayton Dewey's Mac

See merge request agaric/sites/agaric-com!7
This commit is contained in:
Chris Thompson 2018-09-03 16:57:03 +00:00
commit 882916a29b
3 changed files with 16 additions and 16 deletions

View file

@ -1,6 +1,6 @@
def set_overrides_per_project(config) def set_overrides_per_project(config)
# Acquire a hostname from the project root # Acquire a hostname from the project root
project_dir_name = File.basename(ENV['DRUPALVM_PROJECT_ROOT']).gsub("_", "-") project_dir_name = File.basename(ENV['DRUPALVM_PROJECT_ROOT']).gsub("_", "-").gsub(" ", "-")
host_name = "#{project_dir_name}.test" host_name = "#{project_dir_name}.test"
# Override all vconfig values with the new names # Override all vconfig values with the new names

View file

@ -1,27 +1,27 @@
--- ---
- name: determine status of settings location - name: determine status of settings directory and files
stat: find:
path: "{{ drupal_core_path }}/sites/default" paths: "{{ drupal_core_path }}/sites/default/"
register: stat_result recurse: no
register: find_result
- name: ensure settings location is writable - name: ensure settings directory is writable
file: file:
path: "{{ drupal_core_path }}/sites/default" path: "{{ drupal_core_path }}/sites/default"
mode: 0775 mode: 0775
state: directory state: directory
owner: vagrant when: find_result.failed == false
group: vagrant
when: stat_result.stat.exists == true and stat_result.stat.writeable == false
become: yes become: yes
- name: ensure settings file is still writable - name: ensure setting files are writable
file: file:
path: "{{ drupal_core_path }}/sites/default/settings.php" path: "{{ setting_file.path }}"
mode: 0664 mode: 0664
state: file state: file
owner: vagrant when: find_result.failed == false
group: vagrant loop: "{{ find_result.files }}"
when: stat_result.stat.exists == true and stat_result.stat.writeable == false loop_control:
loop_var: setting_file
become: yes become: yes
- name: Run composer install. - name: Run composer install.

View file

@ -7,9 +7,9 @@
delegate_to: localhost delegate_to: localhost
become: false become: false
- name: remove underscores from folder name - name: remove spaces and underscores from folder name
set_fact: set_fact:
proj_root_safe: "{{ proj_root.stdout|basename|replace('_','-') }}" proj_root_safe: "{{ proj_root.stdout|basename|replace('_','-')|replace(' ','-') }}"
# These values are NOT honored by Vagrant, but are still necessary for DrupalVM # These values are NOT honored by Vagrant, but are still necessary for DrupalVM
# See also provisioning/box/config # See also provisioning/box/config