Ensure Ansible knows what Vagrant settings are
This commit is contained in:
parent
6c51f510fa
commit
ac980b850f
2 changed files with 16 additions and 0 deletions
|
@ -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
|
||||||
|
|
15
provisioning/pre-tasks/00-name_by_path.yml
Normal file
15
provisioning/pre-tasks/00-name_by_path.yml
Normal 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"
|
Loading…
Reference in a new issue