This file contains hidden or 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
| puppet dashboard list --enc-server=sony --enc-ssl --enc-port=443 --enc-auth-user=console --enc-auth-passwd=puppet classes --render-as=yaml | |
| puppet dashboard create_group --name=demo1 --enc-server=sony --enc-ssl --enc-port=443 --enc-auth-user=console --enc-auth-passwd=puppet --render-as=yaml | |
| puppet dashboard create_node --name=demo1 --enc-server=sony --enc-ssl --enc-port=443 --enc-auth-user=console --enc-auth-passwd=puppet --render-as=yaml | |
| puppet dashboard create_class --name=demo1 --enc-server=sony --enc-ssl --enc-port=443 --enc-auth-user=console --enc-auth-passwd=puppet --render-as=yaml | |
| puppet dashboard create_node --name=demo2 --classes=pe_mcollective,pe_accounts --groups=default --enc-server=sony --enc-ssl --enc-port=443 --enc-auth-user=console --enc-auth-passwd=puppet --render-as=yaml | |
| puppet dashboard create_group --name=demo3 --classes=stupidity,stupid2 --parent-groups=default --enc-server=sony --enc-ssl --enc-port=443 --enc-auth-user=console --enc-auth-passwd=puppet --render-as=yaml --trace | |
| puppet dashbo |
This file contains hidden or 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
| This method gets an already-prepared password string fed as the variable 'password_hash' | |
| @@users_plist_dir = '/var/db/dslocal/nodes/Default/users' | |
| if File.exists?("#{@@users_plist_dir}/#{resource_name}.plist") | |
| # If a plist already exists in /var/db/dslocal/nodes/Default/users, then | |
| # we will need to extract the binary plist from the 'ShadowHashData' | |
| # key, log the new password into the resultant plist's 'SALTED-SHA512' | |
| # key, and then save the entire structure back. | |
| users_plist = Plist::parse_xml(`plutil -convert xml1 -o /dev/stdout #{@@users_plist_dir}/#{resource_name}.plist`) |
This file contains hidden or 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
| The-Big-Mac:~ glarizza$ defaults read /Applications/TextEdit.app/Contents/Info NSServices | |
| ( | |
| { | |
| NSMenuItem = { | |
| default = "New TextEdit Window Containing Selection"; | |
| }; | |
| NSMessage = openSelection; | |
| NSPortName = TextEdit; | |
| NSSendTypes = ( | |
| "com.apple.flat-rtfd", |
This file contains hidden or 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
| users = %x{ps aux 2> /dev/null | grep [l]oginwindow | cut -d " " -f1}.split | |
| puts (users - ['root']).join(",") |
This file contains hidden or 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
| mount { "/mnt/mount_name_on_disk": | |
| device => "//username:password@server/mountpoint", | |
| fstype => smbfs, | |
| ensure => mounted, | |
| options => 'nostreams', | |
| } |
This file contains hidden or 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
| ## Launching an instance in EC2 | |
| └(~)▷ irb | |
| >> require 'puppet/face' | |
| => true | |
| >> arguments = { 'image' => 'ami-1bd68a5e', 'keyname' => 'gary_test', 'type' => 't1.micro', 'region' => 'us-west-1' } | |
| => {"region"=>"us-west-1", "keyname"=>"gary_test", "type"=>"t1.micro", "image"=>"ami-1bd68a5e"} | |
| >> ec2_ip = Puppet::Face[:node_aws, :current].create(arguments) | |
| ####################### | |
| => "ec2-184-72-21-49.us-west-1.compute.amazonaws.com" |
This file contains hidden or 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 separate { | |
| file { '/tmp/foo': | |
| ensure => file, | |
| content => 'First Level', | |
| } | |
| } | |
| class different inherits separate { | |
| File['/tmp/foo'] { | |
| content => 'different', |
This file contains hidden or 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
| ## This works | |
| class separate($foo = 'bar') { | |
| file { '/tmp/foo': | |
| ensure => file, | |
| content => 'First Level', | |
| } | |
| } | |
| class different inherits separate { |
This file contains hidden or 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
| Plugin:IPConfiguration | |
| Plugin:InterfaceNamer | |
| Setup: | |
| Setup:/ | |
| Setup:/Network/BackToMyMac | |
| Setup:/Network/Global/IPv4 | |
| Setup:/Network/HostNames | |
| Setup:/Network/Interface/en1/AirPort | |
| Setup:/System | |
| State:/IOKit/PowerManagement/Assertions |
This file contains hidden or 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
| This program is distributed "as is" by JAMF Software, LLC. For more information or support for the Redistribution and use in source and binary forms, with or without modification, are permitted provi* Redistributions of source code must retain the above copyright notice, this list of conditions and* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribut* Neither the name of the JAMF Software, LLC nor the names of its contributors may be used to endorsTHIS SOFTWARE IS PROVIDED BY JAMF SOFTWARE, LLC "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JAMF SOFTWARE, LLC BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVIC |