diff --git a/provisioning/pre-tasks/00-name_by_path.yml b/provisioning/pre-tasks/00-name_by_path.yml index d7ad056..d44b13a 100644 --- a/provisioning/pre-tasks/00-name_by_path.yml +++ b/provisioning/pre-tasks/00-name_by_path.yml @@ -7,9 +7,13 @@ delegate_to: localhost become: false +- name: remove underscores from folder name + set_fact: + proj_root_safe: "{{ proj_root.stdout|basename|replace('_','-') }}" + # 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" + vagrant_hostname: "{{ proj_root_safe }}.local" + vagrant_machine_name: "{{ proj_root_safe }}-coop-vm"