Skip to content

Instantly share code, notes, and snippets.

View crayfishx's full-sized avatar

Craig Dunn crayfishx

View GitHub Profile
class profile::puppetmaster {
class { 'puppet::repo::puppetlabs': } -> Package <||>
class { 'puppet::master':
storeconfigs => true,
environments => 'directory',
}
class { 'puppetdb': }
class { 'hiera':
hierarchy => [
policy :puppet do
lookup :default do
datasource :file, {
:format => :yaml,
:docroot => '../etc',
:searchpath => [
"#{scope[:environment]}",
'global',
'common'
]
policy :test do
lookup :yaml do
datasource :yaml, {
:datadir => '/etc/puppet/hieradata',
:searchpath => [
'global',
"hosts/#{scope[:hostname]}",
"env/#{scope[:environment]}",
"global"
policy :craig do
lookup :default do
datasource :file, {
:format => :yaml,
:docroot => "/Users/craigdunn/jacaranda/etc/data",
:searchpath => [
"#{scope[:environment]}",
'global',
'common'
class { 'apt::unattended_upgrades':
blacklisted_packages => [ 'libc6', 'libc6-dev', 'libc6-i686',
'mysql-server', 'redmine', 'nodejs', 'bird' ],
config_template => 'site_apt/50unattended-upgrades.jessie',
}
class apt::unattended_upgrades (
$config_template = undef,
$mailonlyonerror = true,
$ vagrant box add puppetlabs/centos-7.0-64-nocm --provider vmware_fusion
==> box: Loading metadata for box 'puppetlabs/centos-7.0-64-nocm'
box: URL: https://vagrantcloud.com/puppetlabs/centos-7.0-64-nocm
==> box: Adding box 'puppetlabs/centos-7.0-64-nocm' (v1.0.2) for provider: vmware_fusion
box: Downloading: https://atlas.hashicorp.com/puppetlabs/boxes/centos-7.0-64-nocm/versions/1.0.2/providers/vmware_fusion.box
The box you attempted to add doesn't match the provider you specified.
Provider expected: vmware_fusion
Provider of box: vmware_desktop
[15:21:07] <duckduckgeek> Hiya everyone!
[15:21:22] dlitvak_ (~dlitvak@181.229.5.89) left IRC (Ping timeout: 252 seconds)
[15:21:37] <duckduckgeek> would anyone be willing to look at a code sample and help me figure out whats wrong with my program?
[15:21:47] Yzguy (~Yzguy@c-73-200-0-199.hsd1.md.comcast.net) joined the channel
[15:21:57] <duckduckgeek> it seems to be a very simple problem but i just can't figure it out
[15:22:30] <ljarvis> duckduckgeek: please just ask your question and provide code, everyone will see it and you'll increase the chances someone will be able to help
[15:22:40] <ljarvis> basically, don't ask to ask
## foo.pp
$bar=undef
$foo=undef
$content=template('/tmp/foo.erb')
notify { "content is ${content}": }
## foo.erb
firewalld::ports:
my_service:
port: 5666
protocol: tcp
my_other_service:
port: 5667
protocol: tcp
# check if the oracle software already exists
$found = oracle_exists( $oracle_home )
if $found == undef {
$continue = true
....