Browse Source

initial_add

Chris Mague 7 years ago
commit
0c06e86dd1
6 changed files with 65 additions and 0 deletions
  1. 9 0
      .gitignore
  2. 26 0
      Vagrantfile
  3. 8 0
      puppet/Puppetfile
  4. 13 0
      puppet/ext/data/common.yaml
  5. 7 0
      puppet/ext/hiera.yaml
  6. 2 0
      puppet/site.pp

+ 9 - 0
.gitignore

@@ -0,0 +1,9 @@
+.tmp
+.librarian
+.vagrant
+puppet/modules/*
+.rvmrc
+Gemfile.lock
+.ruby-gemset
+.ruby-version
+*.log

+ 26 - 0
Vagrantfile

@@ -0,0 +1,26 @@
+# -*- mode: ruby -*-
+# vi: set ft=ruby :
+
+Vagrant.configure("2") do |config|
+
+  config.vm.box = "ubuntu/xenial64"
+  config.vm.box_url = "https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-vagrant.box"
+
+  config.vm.network "forwarded_port", guest: 9090, host: 9090
+  config.vm.network "forwarded_port", guest: 3000, host: 3000
+  config.vm.network "forwarded_port", guest: 8000, host: 8000
+  config.vm.network "forwarded_port", guest: 8001, host: 8001
+
+
+  config.vm.provision "shell" do |s|
+    s.inline = "cd /tmp &&/usr/bin/apt-get -y install unzip wget && /usr/bin/wget https://apt.puppetlabs.com/puppet-release-xenial.deb && /usr/bin/dpkg -i puppet-release-xenial.deb && /usr/bin/apt update && /usr/bin/apt -y install puppet-agent"
+  end
+
+  config.vm.provision :puppet do |puppet|
+    puppet.hiera_config_path = "puppet/ext/hiera.yaml"
+    puppet.manifests_path    = "puppet"
+    puppet.options           = ["--modulepath", "/tmp/vagrant-puppet/puppet/modules"]
+    puppet.manifest_file     = "site.pp"
+  end
+
+end

+ 8 - 0
puppet/Puppetfile

@@ -0,0 +1,8 @@
+mod 'ec2base',
+  :git => 'https://github.com/shokunin/ec2base.git',
+  :ref => 'master'
+
+mod 'puppetlabs-stdlib', '4.24.0'
+mod 'puppetlabs-concat', '4.1.1'
+mod 'puppet-staging', '3.1.0'
+mod 'puppet-archive', '1.3.0'

+ 13 - 0
puppet/ext/data/common.yaml

@@ -0,0 +1,13 @@
+---
+classes:
+  - ec2base
+
+ec2base_packages:
+  - git
+  - curl
+  - wget
+  - iotop
+  - vim-nox
+  - tree
+  - tmux
+  - bind9utils

+ 7 - 0
puppet/ext/hiera.yaml

@@ -0,0 +1,7 @@
+---
+:backends:
+  - yaml
+:yaml:
+  :datadir: /tmp/data
+:hierarchy:
+  - common

+ 2 - 0
puppet/site.pp

@@ -0,0 +1,2 @@
+hiera_include('classes')
+