Skip to content

Instantly share code, notes, and snippets.

View nmcspadden's full-sized avatar

Nick McSpadden nmcspadden

View GitHub Profile
log_location STDOUT
chef_server_url "https://chef.sacredsf.org:443/organizations/ssh"
validation_client_name "ssh-validator"
ssl_verify_mode :verify_peer
#Create keys
keypair = OpenSSL::PKey::RSA.new 2048
#Create CSR
name = OpenSSL::X509::Name.parse("CN=chef/DC=sacredsf/DC=org")
csr = OpenSSL::X509::Request.new
csr.version = 0
csr.subject = name
csr.public_key = keypair.public_key
csr.sign keypair, OpenSSL::Digest::SHA256.new
Nick-Tech:chef-repo nmcspadden$ chef-shell -c /etc/chef/client.rb
loading configuration: /etc/chef/client.rb
Session type: standalone
Loading......done.
This is the chef-shell.
Chef Version: 12.0.3
http://www.opscode.com/chef
http://docs.opscode.com/
#!/bin/sh
# Copyright 2008-2015, LastPass, LastPass.com
# ALL RIGHTS RESERVED
PACKAGE_PATH=$1
INSTALL_PATH=$2
INSTALL_VOLUME=$3
EXTRA_PARAMS=$4
* Processing manifest item AdobeAcrobatPro11 for optional install
Looking for detail for: AdobeAcrobatPro11, version latest...
Considering 1 items with name AdobeAcrobatPro11 from catalog testing
Considering item AdobeAcrobatPro11, version 11.0 with minimum os version required 10.6.8
Our OS version is 10.10.3
Found AdobeAcrobatPro11, version 11.0 in catalog testing
Looking for application Acrobat with bundleid: com.adobe.Acrobat.Pro, version 11.0.0...
Getting info on currently installed applications...
Looking for application Acrobat with bundleid: com.adobe.Acrobat.Pro, version 11.0.0...
Adding AdobeAcrobatPro11 to the optional install list
#!/usr/bin/python
import csv
import os
MUNKI_REPO = "/Users/Shared/munki/manifests"
with open('serials.csv', mode='r') as infile:
reader = csv.reader(infile)
keyDict = dict(reader)
<dict>
<key>name</key>
<string>Attempted Formatting</string>
<key>description</key>
<string>This will break everything you&apos;ve ever loved</string>
<key>restart_action</key>
<string>none</string>
<key>bless_target</key>
<false/>
<key>components</key>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>password</key>
<string></string>
<key>workflows</key>
<array>
</array>
</dict>
#!/usr/bin/python
import subprocess
import sys
printerName = "PRINTERNAME"
printerOptions = { "HPOption_Duplexer":"False",
"HPOption_500_Sheet_Feeder_Tray3":"False" }
# Only lpoptions needs to be checked - if the printer doesn't exist, lpoptions will fail anyway.
cmd = ['/usr/bin/lpoptions', '-p', printerName, '-l']
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadIdentifier</key>
<string>org.sacredsf.profile.chrome</string>
<key>PayloadRemovalDisallowed</key>
<true/>
<key>PayloadScope</key>
<string>System</string>