Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am rharrison10 on github.
  • I am rharrison10 (https://keybase.io/rharrison10) on keybase.
  • I have a public key ASChGDOOWrzFH32wErMuWk-pq9JOaveCHnR16Q3BoDtvowo

To claim this, I am signing this object:

class hosts {
host { $::fqdn:
ensure => 'present',
host_aliases => [$::hostname, 'localhost'],
ip => '127.0.0.1',
}
@@host { "${::fqdn}_example":
ensure => 'present',
name => $::fqdn,
@rharrison10
rharrison10 / init.pp
Last active December 31, 2015 20:58
Using inherits to set default parameter values
# Copyright 2013 Mojo Lingo LLC.
# Modifications by Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@rharrison10
rharrison10 / test.pp
Created September 7, 2012 17:39
False positive unquoted resource title for colons in resource parameters
class test {
exec { "${::hostname}_fix_root_pw" :
command => '/bin/echo root:\!! | /usr/sbin/chpasswd -e',
onlyif => '/usr/bin/test ! `/bin/grep \'^root:!!:\' /etc/shadow`',
}
}