Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Vagrant Provisioner Puppet Manifest for Mongodb
if versioncmp($::puppetversion,'3.6.1') >= 0 {
$allow_virtual_packages = hiera('allow_virtual_packages', false)
Package {
allow_virtual => $allow_virtual_packages,
}
}
class { 'nodejs':
version => 'v0.12.4',
}
file { [ "/data/", "/data/db/" ]:
ensure => "directory",
}
class {'::mongodb::globals':
manage_package_repo => true,
}->
class {'::mongodb::server':
bind_ip => ["0.0.0.0"],
port => 27017,
verbose => true,
auth => false,
}->
class {'::mongodb::client':}
mongodb_database { "dev":
ensure => present,
tries => 10,
require => Class['mongodb::server'],
}
mongodb_user { 'joe':
name => 'joe',
ensure => present,
password_hash => mongodb_password('joe', 'password'),
database => 'dev',
roles => ['readWrite', 'dbAdmin', 'dbOwner', 'userAdmin'],
}
service { "iptables":
ensure => "stopped",
hasstatus => "true",
status => "true",
}
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "puppetlabs/centos-6.6-64-puppet"
config.vm.box_version = "1.0.1"
config.vm.synced_folder ".", "/image-analyzer/"
config.vm.network "forwarded_port", guest: 27017, host: 27017
config.vm.network "forwarded_port", guest: 3000, host: 3000
config.vm.provision "puppet", run: "always" do |puppet|
puppet.manifests_path = "puppet/manifests"
puppet.module_path = "puppet/modules"
puppet.hiera_config_path = "puppet/hiera.yml"
puppet.working_directory = "/tmp/vagrant-puppet"
#puppet.options = "--verbose --debug"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.