Skip to content

Instantly share code, notes, and snippets.

View nmcspadden's full-sized avatar

Nick McSpadden nmcspadden

View GitHub Profile
<?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>Source</key>
<string>/Applications/Install OS X Yosemite.app</string>
<key>Output</key>
<string>InstallYosemitePuppetMunki.pkg</string>
<key>Packages</key>
<array>
FROM nginx
RUN mkdir -p /munki_repo
Run mkdir -p /etc/nginx/sites-enabled/
ADD nginx.conf /etc/nginx/nginx.conf
ADD munki-repo.conf /etc/nginx/sites-enabled/
VOLUME /munki_repo
EXPOSE 80
FROM nmcspadden/munki
RUN apt-get -yqq update
RUN apt-get -yqq install curl lsb-release
RUN curl -L https://getchef.com/chef/install.sh | bash -s -- -v 11.16.2 -P container
ADD client.rb /etc/chef/client.rb
ADD validation.pem /etc/chef/validation.pem
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
@nmcspadden
nmcspadden / SignProfiles.sh
Last active December 6, 2022 23:33
Signs a folder full of profiles
#!/bin/bash
for profile in Profiles/*.mobileconfig
do
s=${profile##*/}
outName=${s%.*}
outName+="Signed.mobileconfig"
/usr/bin/security cms -S -N "Mac Developer Application" -i $profile -o "$outName"
done
#!/bin/sh
# Set paths to our utilities
networksetup=/usr/sbin/networksetup
airport=/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport
# Determines which OS the script is running on
osvers=$(sw_vers -productVersion | awk -F. '{print $2}')
# On 10.7 and higher, the Wi-Fi interface needs to be identified.