Skip to content

Instantly share code, notes, and snippets.

@dbroeglin
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dbroeglin/d53d2c8bf518eeb5552b to your computer and use it in GitHub Desktop.
Save dbroeglin/d53d2c8bf518eeb5552b to your computer and use it in GitHub Desktop.
Soft-Shake 2014 / Automating your infrastructure with Puppet
class ssh {
package { openssh: ensure => installed }
}
class ssh {
package { openssh: ensure => installed }
file { "/etc/ssh/sshd_config":
name => "/etc/ssh/sshd_config",
owner => root,
group => root,
source => "file:///vagrant/sshd/sshd_config",
require => Package[openssh]
}
}
class ssh {
package { openssh: ensure => installed }
file { "/etc/ssh/sshd_config":
name => "/etc/ssh/sshd_config",
owner => root,
group => root,
source => "file:///vagrant/sshd/sshd_config",
require => Package[openssh]
}
service { sshd:
ensure => running,
subscribe => [
Package[openssh],
File["/etc/ssh/sshd_config"]]
}
}
architecture => amd64
blockdevices => sda
domain => home
fqdn => vagrant-ubuntu-raring-64.home
ipaddress_eth0 => 10.0.2.15
is_virtual => true
kernel => Linux
kernelmajversion => 3.8
kernelrelease => 3.8.0-31-generic
kernelversion => 3.8.0
macaddress_eth0 => 08:00:27:49:4c:f1
...many more...
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.hostname = "dev.demo.softshake"
#config.vm.hostname = "qa.demo.softshake"
config.vm.box = "centos-6.5-64"
config.vm.box_url = "http://puppet-vagrant-boxes.puppetlabs.com/centos-65-x64-virtualbox-puppet.box"
config.vm.synced_folder "../cache", "/cache"
config.vm.provision "puppet" do |puppet|
puppet.manifests_path = "manifests"
puppet.module_path = "modules"
puppet.manifest_file = "site.pp"
puppet.options = "--verbose"
end
# config.vm.provider "virtualbox" do |v|
# v.gui = true
# end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment