agaric-coop/provisioning/pre-tasks/00-name_by_path.yml
2018-08-23 11:51:55 -04:00

15 lines
517 B
YAML

---
- 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"