Info: Applying configuration version '1418826679'
Debug: Augeas[kerberos_etc_services](provider=augeas): Opening augeas with root /, lens path /var/lib/puppet/lib/augeas/lenses, flags 32
Debug: Augeas[kerberos_etc_services](provider=augeas): Augeas version 1.0.0 is installed
Debug: Augeas[kerberos_etc_services](provider=augeas): Will attempt to save and only run if files changed
Debug: Augeas[kerberos_etc_services](provider=augeas): sending command 'defnode' with params ["kerberostcp", "/files/etc/services/service-name[.=\"kerberos\"][protocol = \"tcp\"]", "kerberos"]
Debug: Augeas[kerberos_etc_services](provider=augeas): sending command 'set' with params ["$kerberostcp/port", "88"]
Debug: Augeas[kerberos_etc_services](provider=augeas): sending command 'set' with params ["$kerberostcp/protocol", "tcp"]
Debug: Augeas[kerberos_etc_services](provider=augeas): sending command 'remove' with params ["$kerberostcp/alias"]
Debug: Augeas[kerberos_etc_services](provider=augeas): sending command 'ins' with params ["
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
#!/usr/bin/env ruby | |
# A quick script to download all your files from CloudApp. | |
# To run this just run the script passing your e-mail & password | |
# to the script, for example: | |
# | |
# gem install cloudapp_api | |
# ruby cloudapp-export.rb adam@atechmedia.com mypassword | |
# |
After first puppet execution
augtool> print /files/etc/services/service-name[.="kerberos"]
/files/etc/services/service-name[171] = "kerberos"
/files/etc/services/service-name[171]/port = "88"
/files/etc/services/service-name[171]/protocol = "tcp"
/files/etc/services/service-name[171]/alias[1] = "kerberos5"
/files/etc/services/service-name[171]/alias[2] = "krb5"
/files/etc/services/service-name[171]/alias[3] = "kerberos-sec"
After first puppet execution
augtool> print /files/etc/services/service-name[.="kerberos"]
/files/etc/services/service-name[171] = "kerberos"
/files/etc/services/service-name[171]/port = "88"
/files/etc/services/service-name[171]/protocol = "tcp"
/files/etc/services/service-name[171]/alias[1] = "kerberos5"
/files/etc/services/service-name[171]/alias[2] = "krb5"
/files/etc/services/service-name[171]/alias[3] = "kerberos-sec"
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 'spec_helper' | |
require 'puppet/reports' | |
require 'webmock/rspec' | |
require 'ostruct' | |
class ErbStruct < OpenStruct | |
def initialize(values) | |
values.each { |k,v| instance_variable_set("@#{k}", v) } | |
super | |
end |
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
class sodefaultserver { | |
include resolv_conf | |
resolv_conf{ 'resolv.conf' : | |
domainname=> 'abc.com', | |
searchpath=> 'abc.com', | |
nameservers => ['10.87.42.109', '10.87.42.110'], | |
options => ['timeout:2', 'attempts:3'], | |
} |
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
if before or after | |
# Insert before or after given path | |
aug.insert(before or after, "path", before ? true : false) | |
entry_path = "#{fpath}/path[count(*)=0]" | |
end |