Skip to content

Instantly share code, notes, and snippets.

class fastnetmon (
Hash $policy_defaults = {}
Hash $policy_overrides = {}
Array[Stdlib::IP::Address,1] $networks = [],
Array[Stdlib::IP::Address,1] $all_networks = [],
Optional[Stdlib::Host] $graphite_host = undef,
) {
$policy_overrides.each |String $network| {
$network = slice_network_constants($network['network'], {'desription' => '$network['desrciption']})
file {"etc/fastnetmodn.d/$network_$network['description'].conf": { ... }
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Duplicate declaration: Class[Prometheus::Node_puppet_agent] is already declared in file /etc/puppet/modules/profile/manifests/base/puppet.pp:32; cannot redeclare at /etc/puppet/modules/profile/manifests/wmcs/instance.pp:93 at /etc/puppet/modules/profile/manifests/wmcs/instance.pp:93:5 on node apache01.sso.eqiad.wmflabs
file {'/var/cache/debconf/msodbcsql17.preseed':
ensure => file,
content => "msodbcsql17\tmsodbcsql/accept_eula\tboolean\ttrue\n",
}
package {'msodbcsql17':
ensure => installed,
responsefile => '/var/cache/debconf/msodbcsql17.preseed' # this is autorequired
}
foo: &my_foo
- one
- two
- three
bar:
- *my_foo
- four
- five
'foo': ['one', 'two', 'three']
@b4ldr
b4ldr / ex.pp
Created September 19, 2019 10:22
package { ['foo', 'bar', 'baz']:
ensure => installed,
before => File['/etc/foo.conf']
}
file{'/etc/foo.conf':
ensure => file,
}
hosts:
- database
- some_other_host
debian-9-x64 14:16:16$ puppet module install puppetlabs-concat -v 6.1.0
Notice: Preparing to install into /etc/puppetlabs/code/environments/production/modules ...
Notice: Downloading from https://forgeapi.puppet.com ...
Notice: Installing -- do not interrupt ...
/etc/puppetlabs/code/environments/production/modules
└─┬ puppetlabs-concat (v6.1.0)
├── puppetlabs-stdlib (v6.0.0)
└── puppetlabs-translate (v2.0.0)
debian-9-x64 executed in 14.43 seconds
profile::param: foobar
profile::foo::bar::param foobar
systemd::dropin_file { 'ssh.conf':
unit => 'ssh.service',
content => 'OOMScoreAdjust=0\n',
notify => Service['ssh'],
}