Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am dnase on github.
  • I am dnase (https://keybase.io/dnase) on keybase.
  • I have a public key ASDTeVl6cMYS-A_74IEdoaO5AnUa5WNaHXvNVGIvrs0acwo

To claim this, I am signing this object:

@dnase
dnase / README.md
Last active September 26, 2022 18:12

get_enterprise_url.py

Gets download URLs for Vault Enterprise and Consul Enterprise

Prerequisites:

Semver is the only external dependency. pip install semver

Usage:

python get_enterprise_url.py -h will display all flags and options.

# profile::webserver
# this is a profile class that configures a webserver
class profile::webserver {
class{ 'apache': }
apache::vhost { 'vhost.example.com':
port => '80',
docroot => '/var/www/vhost',
}
}
define users::managed_user (
$group = $title,
)
{
user { $title:
ensure => present,
managehome => true,
home => "/home/${title}",
gid => $group,
}
file "/etc/motd" {
ensure => file,
path => '/etc/motd',
owner => 'root',
group => 'root',
mode => '0755',
content => 'This is a crazy motd!\n'
}
#should be:
Detected conflicting Accounts::Virtual resources
Accounts::Virtual[melanthius] is conflicting
Conflicting resource ending on line 16 (view node report for details)
/etc/puppetlabs/puppet/environments/production/site/accounts/manifests/init.pp:16
16: }
17: @accounts::virtual { 'melantho':
18: uid => 721400112,
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><title>Diff Overview</title><meta name="keywords" content="puppet, diff, preview"/><style type="text/css">
body { font: 20px/120% "Helvetica Neue",Helvetica,Arial, sans-serif }
.tooltip{
display: inline;
position: relative;
}
.tooltip:hover:after{
background: #333;
background: rgba(0,0,0,.8);
border-radius: 5px;
Facter.add(:cloud) do
setcode do
ip = Facter.value(:ipaddress)
octets = ip.split('.')
case octets[2]
when '5'
'Oracle'
when '9'
'Azure'
else
@dnase
dnase / log
Last active March 13, 2017 15:06
drew:puppetize drew.nase$ rake present --trace
** Invoke present (first_time)
** Execute present
Would you like to see the release notes? [Y/n]: N
What is the address of the Classroom server? [services-uswest.skytap.com]
What is the SSH port of the Classroom server? [29629]
rake aborted!
Resolv::ResolvError: no address for services-uswest.skytap.com
/Users/drew.nase/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/resolv.rb:93:in `getaddress'
/Users/drew.nase/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/resolv.rb:43:in `getaddress'