I hereby claim:
- I am paaloeye on github.
- I am paaloeye (https://keybase.io/paaloeye) on keybase.
- I have a public key ASB0ve50sHcKeQFvg8_aDuSFxZsxlMayhwEo2CTwDK5DdAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
### Keybase proof | |
I hereby claim: | |
* I am paulche on github. | |
* I am pchechetin (https://keybase.io/pchechetin) on keybase. | |
* I have a public key ASCQCa8qNZPA5_9H8F5uoAgSQm9QD5MaQkAni9RYT8blbAo | |
To claim this, I am signing this object: |
# brew list -l | |
total 0 | |
drwxr-xr-x 3 paulche staff 102 Aug 15 2015 ack | |
drwxr-xr-x 5 paulche staff 170 Jan 18 12:52 ansible | |
drwxr-xr-x 3 paulche staff 102 Jan 31 17:18 apache-spark | |
drwxr-xr-x 3 paulche staff 102 Jun 10 23:20 atk | |
drwxr-xr-x 3 paulche staff 102 Aug 16 2015 augeas | |
drwxr-xr-x 3 paulche staff 102 Aug 15 2015 autoconf | |
drwxr-xr-x 3 paulche staff 102 Aug 15 2015 automake | |
drwxr-xr-x 3 paulche staff 102 Aug 16 2015 bind |
brew list -l | |
drwxr-xr-x 3 user staff 102 Jun 19 09:39 ack | |
drwxr-xr-x 3 user staff 102 Jun 19 16:10 augeas | |
drwxr-xr-x 3 user staff 102 Jun 19 09:19 boost | |
drwxr-xr-x 3 user staff 102 Jun 19 15:32 cmake | |
drwxr-xr-x 3 user staff 102 Jun 19 16:11 drip | |
drwxr-xr-x 3 user staff 102 Jun 19 09:39 findutils | |
drwxr-xr-x 3 user staff 102 Jun 19 09:17 freetype | |
drwxr-xr-x 3 user staff 102 Jun 19 09:22 gcc5 | |
drwxr-xr-x 3 user staff 102 Jun 19 15:31 gdbm |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# NETWORKS: 10.0.10/24 - 10.0.20/24 | |
# PXE: 10.0.10/24 | |
# Management: 10.0.11/24 | |
# Public: 10.0.12/24 | |
# Storage: 10.0.13/24 | |
# Fuel Admin: 10.0.14/24 |
require 'resolv' | |
# Alter /etc/hosts leveraging Augeus | |
# 1. Find /files/etc/hosts/$x/canonical with needed | |
# | | |
# |---- Found: 2.1 Check ip | |
# | | |
# |---- Not found: 2.2 Create node | |
node_start = 1 |
# Put in $module/lib/puppet/parser/functions/hash_join_dnsmasq.rb | |
module Puppet::Parser::Functions | |
newfunction(:hash_join_dnsmasq, :type => :rvalue, :arity => 2, :doc => <<-EOS | |
Take hash and string, join them for dnsmasq. | |
EOS | |
) do |arguments| | |
hash = arguments[0] | |
ip = arguments[1] | |
# Put in $module/lib/puppet/parser/functions/hash_detect.rb | |
module Puppet::Parser::Functions | |
newfunction(:hash_detect, :type => :rvalue, :doc => <<-EOS | |
Take array of hashes and key and value for search and optional key whom value should be returned. | |
EOS | |
) do |arguments| | |
haystack = arguments[0] |
require 'md5' | |
module Puppet::Parser::Functions | |
newfunction(:file_tree_hash, :type => :rvalue, :arity => 1, :doc => <<-EOS | |
Returns MD5 has for given prefix. It travers file tree recursively. | |
EOS | |
) do |arguments| | |
prefix = arguments[0] | |
content = Dir .glob("#{prefix}/**/*") \ |