| OLD | NEW |
| 1 # coding: utf-8 | 1 # coding: utf-8 |
| 2 # vi: set fenc=utf-8 ft=ruby ts=8 sw=2 sts=2 et: | 2 # vi: set fenc=utf-8 ft=ruby ts=8 sw=2 sts=2 et: |
| 3 require 'shellwords' | 3 require 'shellwords' |
| 4 require 'yaml' | 4 require 'yaml' |
| 5 | 5 |
| 6 # https://issues.adblockplus.org/ticket/170 | 6 # https://issues.adblockplus.org/ticket/170 |
| 7 if !system('python', File.expand_path('../ensure_dependencies.py', __FILE__)) | 7 if !system('python', File.expand_path('../ensure_dependencies.py', __FILE__)) |
| 8 message = 'Failed to ensure dependencies being up-to-date!' | 8 message = 'Failed to ensure dependencies being up-to-date!' |
| 9 raise Vagrant::Errors::VagrantError, message | 9 raise Vagrant::Errors::VagrantError, message |
| 10 end | 10 end |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 # https://www.vagrantup.com/docs/boxes.html | 53 # https://www.vagrantup.com/docs/boxes.html |
| 54 host.vm.box = 'debian/contrib-jessie64' | 54 host.vm.box = 'debian/contrib-jessie64' |
| 55 host.vm.box_url = 'https://atlas.hashicorp.com/debian/boxes/contrib-jess
ie64' | 55 host.vm.box_url = 'https://atlas.hashicorp.com/debian/boxes/contrib-jess
ie64' |
| 56 | 56 |
| 57 # https://packages.debian.org/jessie/puppet | 57 # https://packages.debian.org/jessie/puppet |
| 58 host.vm.provision :shell, :privileged => true, :inline => <<-end | 58 host.vm.provision :shell, :privileged => true, :inline => <<-end |
| 59 set -e -- '#{sync_path}' /etc/puppet/hiera.yaml | 59 set -e -- '#{sync_path}' /etc/puppet/hiera.yaml |
| 60 if ! which puppet >/dev/null; then | 60 if ! which puppet >/dev/null; then |
| 61 apt-get -y update | 61 apt-get -y update |
| 62 apt-get -y install puppet | 62 apt-get -y install puppet apt-transport-https |
| 63 fi | 63 fi |
| 64 test -e "$1" || ln -s /vagrant "$1" | 64 test -e "$1" || ln -s /vagrant "$1" |
| 65 test -e "$2" || ln -s infrastructure/hiera/hiera.yaml "$2" | 65 test -e "$2" || ln -s infrastructure/hiera/hiera.yaml "$2" |
| 66 puppet agent --enable | 66 puppet agent --enable |
| 67 end | 67 end |
| 68 | 68 |
| 69 # https://docs.puppet.com/puppet/latest/configuration.html#hieraconfig | 69 # https://docs.puppet.com/puppet/latest/configuration.html#hieraconfig |
| 70 puppet_options << "--hiera_config=#{sync_path}/hiera/hiera.yaml" | 70 puppet_options << "--hiera_config=#{sync_path}/hiera/hiera.yaml" |
| 71 | 71 |
| 72 else | 72 else |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 end | 110 end |
| 111 | 111 |
| 112 # https://github.com/mitchellh/vagrant/issues/1673 | 112 # https://github.com/mitchellh/vagrant/issues/1673 |
| 113 host.ssh.shell = "sh -c 'BASH_ENV=/etc/profile exec bash'" | 113 host.ssh.shell = "sh -c 'BASH_ENV=/etc/profile exec bash'" |
| 114 | 114 |
| 115 end | 115 end |
| 116 | 116 |
| 117 end | 117 end |
| 118 | 118 |
| 119 end | 119 end |
| OLD | NEW |