- A laptop with Vagrant installed
- Willingness to ask questions and help others!
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 | |
OTP=$1 | |
owner=$2 | |
repo=$3 | |
user=CHANGEME | |
curl -H "X-GitHub-OTP: $OTP" -i -u $user -X POST https://api.github.com/repos/$owner/$repo/hooks --data @irc.json |
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
# demo data (augeasproviders resources) | |
$data = { | |
'kernel_parameter' => { 'net.ifnames' => { value => 0 }}, | |
'host' => { 'localhost' => { ip => '127.0.0.1' }} | |
} | |
validate_hash($data) | |
# store an array of resource types in a variable | |
$resources = keys($data) |
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 | |
# Lists Linux block devices and for each one the controller | |
# it is connected to. | |
set -o pipefail | |
for i in /sys/block/sd*; do | |
# Find the path that contains the PCI ID of the controller. | |
link=$(readlink $i) | |
# Assume that the PCI ID of the controller is the path part | |
# right before the /host... part. |
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
curl -L -O http://downloads.dell.com/FOLDER02351965M/1/OM-MgmtStat-Dell-Web-LX-8.0.1-1176_A00.tar.gzq | |
tar xvfz OM-MgmtStat-Dell-Web-LX-8.0.1-1176_A00.tar.gz | |
cd linux/rac/RHEL7 | |
sudo yum -y install srvadmin-idracadm-8.0.1-4.3.26.el7.x86_64.rpm srvadmin-omilcore-8.0.1-4.74.1.el7.x86_64.rpm smbios-utils-bin-2.2.27-4.3.3.el7.x86_64.rpm libsmbios-2.2.27-4.3.3.el7.x86_64.rpm | |
# dump xml to NFS share | |
sudo -i idracadm -r 129.240.x.x -u root -p calvin get -f r730xd.xml -t xml -l 129.240.x.x:/var/nfs |
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
curl -L -O http://nightlies.puppetlabs.com/puppet-agent-latest/repos/el/7/products/x86_64/puppet-agent-0.2.2-1.x86_64.rpm | |
fpm -s rpm -t dir puppet-agent-0.2.2-1.x86_64.rpm | |
find puppet-agent.dir/ | sed 's/puppet-agent.dir//' | sort > file.list |
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
echo ' | |
Setting["safemode_render"] = false | |
include Foreman::Renderer | |
ConfigTemplate.build_pxe_default(self) | |
Setting["safemode_render"] = true | |
' | foreman-rake console |
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
mgmt=eth1 | |
# shutdown the mgmt interface | |
ifdown $mgmt | |
Run ./foreman-bootstrap-setup.sh <location> | |
ip link set $mgmt master pxebr | |
ip link set dev $mgmt up |
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 | |
# | |
# Serve kickstart file | |
# | |
pgrep -f "python -m SimpleHTTPServer" | xargs --no-run-if-empty kill | |
cd /var/www/html && python -m SimpleHTTPServer & | |
# | |
# Run virt-install to build (or rebuild) <loc>-foreman-1 |
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 | |
cp -f /usr/share/syslinux/memdisk \ | |
/usr/share/syslinux/menu.c32 \ | |
/usr/share/syslinux/chain.c32 \ | |
/usr/share/syslinux/pxelinux.0 \ | |
/var/lib/tftpboot | |
# | |
# Get the installer initrd and kernel |