Bash 游荡文件上的Rsync错误
我想使用Vagrant部署一个应用程序。结构如下:Bash 游荡文件上的Rsync错误,bash,vagrant,ansible,rsync,Bash,Vagrant,Ansible,Rsync,我想使用Vagrant部署一个应用程序。结构如下: - Vagrant box; - frontend; 我想在vagrant box外阅读.ts文件 我的流浪汉档案: ... config.vm.provider :virtualbox do |vbox, override| vbox.cpus = 2 vbox.memory = 4096 override.vm.box = 'box/centos-7.2'
- Vagrant box;
- frontend;
我想在vagrant box外阅读.ts文件
我的流浪汉档案:
...
config.vm.provider :virtualbox do |vbox, override|
vbox.cpus = 2
vbox.memory = 4096
override.vm.box = 'box/centos-7.2'
config.vm.synced_folder ".", "/vagrant", disabled: true
override.vm.synced_folder '../frontend/', '/frontend', type: "rsync", rsync__exclude: get_ignored_files()
end
config.vm.provision 'ansible_local' do |ansible|
ansible.playbook = 'ansible/ionic_configuration.yml'
end
...
def get_ignored_files()
ignore_file = ".rsyncignore"
ignore_array = []
if File.exists? ignore_file and File.readable? ignore_file
File.read(ignore_file).each_line do |line|
ignore_array << line.chomp
end
end
return ignore_array
end
错误:
正在运行ansible playbook。。。。
bash:line 2:cd:/vagrant:没有这样的文件或目录
我做错了什么
正在运行ansible playbook。。。。bash:line 2:cd:/vagrant:没有这样的文件
或目录
及
两者不相容
如果您的设备需要访问/vagrant
目录,请不要禁用共享文件夹。把电话线拔下来
如果您不想离开/vagrant
默认共享文件夹,则需要更改您的设置,使其不会访问此文件夹,并使用另一个共享文件夹
正在运行ansible playbook。。。。bash:line 2:cd:/vagrant:没有这样的文件
或目录
及
两者不相容
如果您的设备需要访问/vagrant
目录,请不要禁用共享文件夹。把电话线拔下来
如果您不想离开/vagrant
默认共享文件夹,则需要更改您的设置,使其不会访问此文件夹,并使用另一个共享文件夹
.DS_Store
.idea
.git
.vscode
config.vm.synced_folder ".", "/vagrant", disabled: true