我的 yaml 文件如下所示:
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/VagrantSites/project-base
to: /home/vagrant/sites/project-base
- map: ~/VagrantSites/craft-base
to: /home/vagrant/sites/craft-base
sites:
- map: local.project-base
to: /home/vagrant/sites/project-base/public_html
- map: craft.dev
to: /home/vagrant/sites/craft-base/public_html
databases:
- homestead
variables:
- key: APP_ENV
value: local
- key: APP_DEV_MODE
value: true
- key: APP_DB_SERVER
value: localhost
- key: APP_DB_DATABASE
value: craft_base
- key: APP_DB_USER
value: homestead
- key: APP_DB_PASSWORD
value: secret
大概是因为我收到此错误时语法错误:
There are errors in the configuration of this machine. Please fix
the following errors and try again:
shell provisioner:
* Shell provisioner `args` must be a string or array.
我尝试删除除第一个变量之外的所有破折号,但根本没有设置任何破折号。