Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Commit

Permalink
Revert "More Vagrant improvements"
Browse files Browse the repository at this point in the history
This reverts commit 413e398.
  • Loading branch information
rtrinque committed Jul 20, 2018
1 parent 001d70a commit a8c2d30
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 44 deletions.
38 changes: 19 additions & 19 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,28 +63,28 @@ Vagrant.configure("2") do |config|
end

# These can't be NFS because OSX won't export overlapping paths.
c.vm.synced_folder "tools/vagrant/gpg", "/etc/puppet/gpg", :owner => 'puppet', :group => 'puppet', type: "rsync"
# This needs to be in this location for Hiera lookups to work.
c.vm.synced_folder ".", "/usr/share/puppet/production/current"
c.vm.synced_folder "gpg", "/etc/puppet/gpg", :owner => 'puppet', :group => 'puppet', type: "rsync"
# Additional shared folders for Puppet Master nodes.
if node_name =~ /^puppetmaster/
c.vm.synced_folder ".", "/usr/share/puppet/production/current"
end

node_puppet_role = node_name.split('.')[0].gsub(/[\-0-9]+$/, '')

c.vm.provision :shell, :path => "tools/vagrant/#{node_attributes['box']}/base.sh"
c.vm.provision :shell, :inline => '/var/govuk/govuk-puppet/tools/vagrant/mock-ec2-metadata-service.py'
c.vm.provision :shell, :path => "tools/vagrant/#{node_attributes['box']}/puppet3.sh"

c.vm.provision :puppet do |puppet|
puppet.module_path = ['modules', 'vendor/modules']
puppet.manifests_path = 'manifests'
puppet.manifest_file = 'site.pp'
puppet.facter = {
'aws_migration' => node_puppet_role.gsub('-', '_'),
'aws_stackname' => 'blue',
'vagrant' => true
}
puppet.hiera_config_path = 'hiera_aws.yml'
puppet.options = '--trusted_node_data --environment vagrant'
end
c.vm.provision :shell, :path => 'tools/vagrant-bootstrap'
c.vm.provision :shell, :inline => '/var/govuk/govuk-puppet/tools/mock-ec2-metadata-service.py'
c.vm.provision :shell, :inline => 'mkdir -p /etc/facter/facts.d'
c.vm.provision :shell, :inline => "echo 'aws_migration=#{node_puppet_role}' > /etc/facter/facts.d/aws_migration.txt"
c.vm.provision :shell, :inline => "echo 'aws_stackname=blue' > /etc/facter/facts.d/aws_stackname.txt"

c.vm.provision :shell,
inline: '/var/govuk/govuk-puppet/tools/puppet3-bootstrap',
env: { 'INSTALL_GEMS' => '1' }

c.vm.provision :shell,
path: 'tools/puppet-apply',
args: ENV['VAGRANT_GOVUK_PUPPET_OPTIONS'],
env: { 'ENVIRONMENT' => 'vagrant' }
end
end
end
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions tools/vagrant-bootstrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
set -e
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get -y upgrade
apt-get -y install language-pack-en jq curl git
12 changes: 0 additions & 12 deletions tools/vagrant/ubuntu/trusty64/base.sh

This file was deleted.

13 changes: 0 additions & 13 deletions tools/vagrant/ubuntu/trusty64/puppet3.sh

This file was deleted.

0 comments on commit a8c2d30

Please sign in to comment.