我正在尝试运行shell sed命令作为config.vm.provision的一部分
config.vm.provision“shell”,内联:<< -SHELL systemctl停止firewalld systemctl禁用firewalld …
你能试一下吗?
$script = <<-SCRIPT systemctl stop firewalld systemctl disable firewalld swapoff -a sed -i '/\/swapfile/s/^/#/g' /etc/fstab SCRIPT Vagrant.configure("2") do |config| config.vm.provision "shell", inline: $script end