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 'win32ole' | |
require 'win32/registry' | |
def connect(uri = wmi_resource_uri) | |
WIN32OLE.connect(uri) | |
end | |
def wmi_resource_uri( host = '.' ) | |
"winmgmts:{impersonationLevel=impersonate}!//#{host}/root/cimv2" | |
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
1) Hiera::Backend#datadir should default to /var/lib/hiera | |
Failure/Error: Backend.datadir(:rspec, {}) | |
Mocha::ExpectationError: | |
unexpected invocation: Hiera::Backend.parse_string('C:\\ProgramData/PuppetLabs/hiera/var', {}) | |
unsatisfied expectations: | |
- expected exactly once, not yet invoked: Hiera::Backend.parse_string('/var/lib/hiera', {}) | |
# ./lib/hiera/backend.rb:16:in `datadir' | |
# ./spec/unit/backend_spec.rb:15 | |
2) Hiera#initialize should default to /etc/hiera.yaml for config |
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
package { 'Java(TM) 7 Update 5': | |
ensure => installed, | |
source => '...\jre-7u5-windows-i586.exe', | |
install_options => [ | |
'/s', '/v/qn" ADDLOCAL=jrecore REBOOT=Suppress JAVAUPDATE=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
class jenkins::registry { | |
include registry | |
# enable rdp | |
registry_value { 'hklm\SYSTEM\CurrentControlSet\Control\Terminal Server\fDenyTSConnections': | |
ensure => present, | |
type => dword, | |
data => 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
# where <path> is the path to the MSI. | |
require 'win32ole' | |
installer = WIN32OLE.new('WindowsInstaller.Installer') | |
db = installer.OpenDatabase(path, 0) | |
puts db.SummaryInformation.Property(9) |
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
[rails] | |
rails_loglevel=debug | |
[master] | |
storeconfigs=true | |
dbadapter=sqlite3 |
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 'rubygems' | |
require 'Win32API' | |
require 'win32ole' | |
require 'win32/registry' | |
require 'sys/admin' | |
require 'win32/process' | |
require 'win32/dir' | |
require 'win32/service' | |
require 'win32/api' | |
require 'win32/taskscheduler' |
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
SETTING ':agent_catalog_run_lockfile' | |
lib/puppet/agent/locker.rb:32: @lockfile_path ||= Puppet[:agent_catalog_run_lockfile] | |
lib/puppet/defaults.rb:1052: :agent_catalog_run_lockfile => { | |
SETTING ':agent_disabled_lockfile' | |
lib/puppet/agent/disabler.rb:48: @disable_lockfile ||= Puppet::Util::JsonLockfile.new(Puppet[:agent_disabled_lockfile]) | |
lib/puppet/defaults.rb:1058: :agent_disabled_lockfile => { | |
SETTING ':allow_duplicate_certs' | |
lib/puppet/defaults.rb:670: :allow_duplicate_certs => { |
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
ruby -rubygems -e "require 'puppet'; puts Puppet::Type.type(:user).new(:name => 'puppet').provider" | |
ruby -rubygems -e "require 'puppet'; puts Puppet::Type.type(:group).new(:name => 'puppet').provider" |
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
root@puppetmaster:/etc/puppet/modules/test/manifests# cat def.pp | |
define test::def { | |
notify { 'test': | |
message => "Some test def for '$name'", | |
} | |
} | |
root@puppetmaster:/etc/puppet/modules/test/manifests# puppet apply -e "test::def { 'puppetdsl': }" | |
Notice: Some test def for 'puppetdsl' | |
Notice: /Stage[main]//Test::Def[puppetdsl]/Notify[test]/message: defined 'message' as 'Some test def for 'puppetdsl'' | |
Notice: Finished catalog run in 0.02 seconds |
OlderNewer