Quelltext meines Vagrant/Ansible Setups für den Ruby Kurs an unserer Schule. https://software-berater.net/2019/das-ruby-labor/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.7 KiB

# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
config.vm.hostname = 'ruby-lab'
# Every Vagrant development environment requires a box. You can search for
# boxes at https://vagrantcloud.com/search.
config.vm.box = 'emptybox/ubuntu-bionic-amd64-lxc'
# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
config.vm.box_check_update = false
# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data"
if Vagrant.has_plugin?('vagrant-proxyconf')
config.proxy.http = ENV['HTTP_PROXY']
config.proxy.https = ENV['HTTPS_PROXY']
config.proxy.no_proxy = ENV['NO_PROXY']
config.vm.provision 'ansible_local' do |ansible|
ansible.become = true
ansible.playbook = 'provision/setup.yml'
config.vm.provider :lxc do |lxc, override|
lxc.container_name = :machine
lxc.customize 'cgroup.memory.limit_in_bytes', "#{8*1024}M"
lxc.customize 'net.0.hwaddr', '00:16:3e:89:d8:6b'