Skip to content

Instantly share code, notes, and snippets.

View groob's full-sized avatar
🌻

Victor Vrantchan groob

🌻
View GitHub Profile
@groob
groob / client.cfg
Created April 27, 2013 19:33
Installing mcollective 2.2.3 on OS X 10.8
# main config
libdir = /usr/share/mcollective/plugins
logfile = /var/log/mcollective.log
daemonize = 1
keeplogs = 1
max_log_size = 10240
loglevel = debug
identity = my_laptop
registerinterval = 300
@groob
groob / test.sh
Last active December 17, 2015 03:08
locad@ts255 ~ $ sudo puppet resource service org.apache.httpd [system]
service { 'org.apache.httpd':
ensure => 'running',
enable => 'true',
}
locad@ts255 ~ $ sudo ruby test.rb [system]
Puppet::Type::Service::ProviderLaunchd
:absent
locad@ts255 ~ $ cat test.rb [system]
require 'puppet'
#!/bin/bash
source /usr/local/munki/munkiwebadmin-config
FILES=(
"preflight"
"postflight"
"report_broken_client"
"munkiwebadmin-config"
)
for item in ${FILES[@]}
#!/bin/bash
source /usr/local/munki/munkiwebadmin-config
FILES=(
"preflight"
"postflight"
"report_broken_client"
"munkiwebadmin-config"
)
for item in ${FILES[@]}
include wget
# Setup apache and mysql
class {'apache': }
class {'apache::mod::php': }
class { 'mysql': }
class { 'mysql::server':
config_hash => { 'root_password' => 'password' }
}
# Install Tiny Tiny RSS
https://github.com/Jaharmi/autopkg_recipes.git
http://github.com/autopkg/recipes.git
https://github.com/hjuutilainen/autopkg-recipes.git
https://github.com/keeleysam/recipes.git
vvrantchan@C02L49F3DR53 ~ $ facter -h
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- facter/application (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/bin/facter:72:in `<main>'
class bootstrap::nosslsearch {
host { 'www.google.com':
ensure => 'present',
ip => $::nosslsearch_ip_address,
target => '/etc/hosts',
notify => Exec["flushdnscache"],
}
exec { 'flushdnscache':
command => "/usr/bin/dscacheutil -flushcache",
$ munkiimport CS5Product_Install.pkg
Making disk image containing CS5Product_Install.pkg...
/Users/wadmin/Desktop/CS5Product_Install.pkg/Contents/Resources/ASU/Install.dylib/Contents/CodeResources: Authentication errorhdiutil: create failed - user interaction required for authorization
Disk image creation failed.
Could not convert CS5Product_Install.pkg to a disk image.
require 'cfpropertylist'
module Puppet::Parser::Functions
newfunction(:has_app, :type => :rvalue) do |args|
if (args.is_a? String)
args = [args]
end
appname = args[0]
plist = CFPropertyList::List.new(:file => "/Library/Managed Installs/ApplicationInventory.plist")
data = CFPropertyList.native_types(plist.value)