1 Star 0 Fork 1

清心道人/DevSecOps-Studio

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Vagrantfile 1.82 KB
一键复制 编辑 原始数据 按行查看 历史
secfigo 提交于 2020-04-17 19:02 . Add DEBIAN_FRONTEND=noninteractive
# -*- mode: ruby -*-
# # vi: set ft=ruby :
# Vagrant version and Vagrant API version requirements
Vagrant.require_version ">= 1.6.0"
VAGRANTFILE_API_VERSION = "2"
# YAML module for reading box configurations.
require 'yaml'
# Read machine configs from YAML file
machines = YAML.load_file(File.join(File.dirname(__FILE__), 'machines.yml'))
# Create boxes
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Disable updates to keep environment sane.
config.vm.box_check_update = false
# Disable shared folder, see https://superuser.com/questions/756758/is-it-possible-to-disable-default-vagrant-synced-folder
config.vm.synced_folder '.', '/vagrant', disabled: true
# Iterate through entries in YAML file
machines.each do |machine|
config.vm.define machine["name"] do |box|
box.vm.box = machine["box"]
box.vm.box_version = machine["box_version"]
box.vm.hostname = machine["name"]
box.vm.network "private_network", ip: machine["ip"]
if machine["script"] != nil
box.vm.provision :shell, :path => machine["script"]
end
if machine["ansible"] != nil
box.vm.provision "ansible" do |ansible|
ansible.playbook = machine["ansible"]
ansible.extra_vars = { ansible_python_interpreter:"/usr/bin/python3" }
ansible.verbose = "vv"
end
end
box.vm.provider :virtualbox do |vb|
vb.name = machine["name"]
vb.memory = machine["ram"]
if machine["gui"] != nil
vb.gui = false
end # end of gui
vb.customize ["modifyvm", :id, "--groups", "/DevSecOps-Studio"]
end # end of vb provider
end # end of box
end # end of machines loop
config.vm.provision "shell", inline: <<-SHELL
DEBIAN_FRONTEND=noninteractive apt-get install -y avahi-daemon libnss-mdns
SHELL
end # end of config
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/qingxindaoren/DevSecOps-Studio.git
git@gitee.com:qingxindaoren/DevSecOps-Studio.git
qingxindaoren
DevSecOps-Studio
DevSecOps-Studio
master

搜索帮助