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
#!/usr/bin/python | |
import sys | |
import os | |
import subprocess | |
from munkilib import fetch | |
from munkilib import FoundationPlist | |
#Dynamic Config Munki Preflight Script by John Rozewicki | |
#2010-12-08 | |
# |
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
#!/usr/bin/env ruby | |
## | |
# == Usage | |
# | |
# Perform hostgroup search for host 'host1.tld' | |
# +ruby foreman_extlookup.rb https://foreman-server.tld -i hostgroups -s "host = host1.tld" -u lookup -p Password1+ | |
# | |
# Perform hostgroup search for host 'host1.tld' without providing password, will be prompted for password | |
# +ruby foreman_extlookup.rb https://foreman-server.tld -i hostgroups -s "host = host1.tld" -u lookup -p+ |
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
#!/bin/bash | |
ARCH=$(uname -m) | |
[ "$ARCH" == "x86_64" ] && INV_ARCH="i686" || INV_ARCH="x86_64" | |
KERNEL=$(uname -r) | |
echo $KERNEL | grep -q $ARCH | |
[ $? -ne 0 ] && echo ${KERNEL//$INV_ARCH/$ARCH} || echo $KERNEL |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
def home | |
File.expand_path('~') | |
end | |
# Define 10GB disks to attach to VM | |
def extra_disks | |
[ |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# References | |
# [1] - https://github.com/treydock/puppet-zfsonlinux/tree/development_zpool_type | |
module LocalHelper | |
def self.home | |
File.expand_path('~') | |
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
#!/usr/share/foreman/script/rails runner -e production | |
Host.all.each do |host| | |
next unless host.dns? | |
print "#{host}..." | |
dns_a_record = host.dns_a_record | |
print "#{dns_a_record}..." | |
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
#!/usr/share/foreman/script/rails runner -e production | |
Host.all.each do |host| | |
next unless host.dhcp? | |
print "#{host}..." | |
dhcp_record = host.dhcp_record | |
print "#{dhcp_record}..." |
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
Debug: Puppet::Type::User::ProviderLdap: true value when expecting false | |
Debug: Puppet::Type::User::ProviderPw: file pw does not exist | |
Debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/dsimport does not exist | |
Debug: Puppet::Type::User::ProviderUser_role_add: file roleadd does not exist | |
Debug: Puppet::Type::Group::ProviderLdap: true value when expecting false | |
Debug: Puppet::Type::Group::ProviderPw: file pw does not exist | |
Debug: Puppet::Type::Group::ProviderDirectoryservice: file /usr/bin/dscl does not exist | |
Debug: Using settings: adding file resource 'reportdir': 'File[/var/lib/puppet/reports]{:links=>:follow, :group=>"puppet", :backup=>false, :owner=>"puppet", :mode=>"750", :ensure=>:directory, :path=>"/var/lib/puppet/reports", :loglevel=>:debug}' | |
Debug: Using settings: adding file resource 'vardir': 'File[/var/lib/puppet]{:links=>:follow, :backup=>false, :ensure=>:directory, :path=>"/var/lib/puppet", :loglevel=>:debug}' | |
Debug: Using settings: adding file resource 'ssldir': 'File[/var/lib/pup |
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
Debug: Puppet::Type::User::ProviderLdap: true value when expecting false | |
Debug: Puppet::Type::User::ProviderPw: file pw does not exist | |
Debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/dsimport does not exist | |
Debug: Puppet::Type::User::ProviderUser_role_add: file roleadd does not exist | |
Debug: Puppet::Type::Group::ProviderLdap: true value when expecting false | |
Debug: Puppet::Type::Group::ProviderPw: file pw does not exist | |
Debug: Puppet::Type::Group::ProviderDirectoryservice: file /usr/bin/dscl does not exist | |
Debug: Using settings: adding file resource 'reportdir': 'File[/var/lib/puppet/reports]{:links=>:follow, :group=>"puppet", :backup=>false, :owner=>"puppet", :mode=>"750", :ensure=>:directory, :path=>"/var/lib/puppet/reports", :loglevel=>:debug}' | |
Debug: Using settings: adding file resource 'vardir': 'File[/var/lib/puppet]{:links=>:follow, :backup=>false, :ensure=>:directory, :path=>"/var/lib/puppet", :loglevel=>:debug}' | |
Debug: Using settings: adding file resource 'ssldir': 'File[/var/lib/pup |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'pp' | |
require 'optparse' | |
def parse(args) | |
@options = {} | |
@options['debug'] = false |
OlderNewer