Ensure Ansible knows what Vagrant settings are

This commit is contained in:
Chris Thompson 2018-08-23 11:51:55 -04:00
parent 6c51f510fa
commit ac980b850f
2 changed files with 16 additions and 0 deletions

View file

@ -272,3 +272,4 @@ hostname_fqdn: "{{ vagrant_hostname }}"
ssh_home: "{{ drupal_core_path }}" ssh_home: "{{ drupal_core_path }}"
post_provision_tasks_dir: ../../provisioning/tasks/*.yml post_provision_tasks_dir: ../../provisioning/tasks/*.yml
pre_provision_tasks_dir: ../../provisioning/pre-tasks/*.yml

View file

@ -0,0 +1,15 @@
---
- name: get root folder of project
shell: pwd
register: proj_root
args:
chdir: "{{ playbook_dir }}/../../"
delegate_to: localhost
become: false
# These values are NOT honored by Vagrant, but are still necessary for DrupalVM
# See also provisioning/box/config
- name: set vagrant hostname according to the project folder
set_fact:
vagrant_hostname: "{{ proj_root.stdout|replace("_", "-")|basename }}.local"
vagrant_machine_name: "{{ proj_root.stdout|replace("_", "-")|basename }}-coop-vm"