Reorganize provisioning files
This commit is contained in:
parent
98bb404ed4
commit
e0d288a095
5 changed files with 2 additions and 2 deletions
19
provisioning/box/pre-tasks/00-name_by_path.yml
Normal file
19
provisioning/box/pre-tasks/00-name_by_path.yml
Normal file
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
- name: get root folder of project
|
||||
shell: pwd
|
||||
register: proj_root
|
||||
args:
|
||||
chdir: "{{ playbook_dir }}/../../"
|
||||
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_safe }}.local"
|
||||
vagrant_machine_name: "{{ proj_root_safe }}-coop-vm"
|
Loading…
Add table
Add a link
Reference in a new issue