This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am pbrit on github. | |
* I am pchechetin (https://keybase.io/pchechetin) on keybase. | |
* I have a public key whose fingerprint is A751 56DE F270 7AD3 9CDF 2B47 E58F 9420 A6A8 904C | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### 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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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] | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}/**/*") \ |
NewerOlder