Skip to content

Instantly share code, notes, and snippets.

View blackknight36's full-sized avatar
💭
I may be slow to respond.

Michael blackknight36

💭
I may be slow to respond.
View GitHub Profile
version: "3.2"
services:
puppetdb:
deploy:
replicas: 2
hostname: mdct-puppetdb
image: docker-registry.example.com/puppetdb:latest
ports:
- 8080:8080
#!/usr/bin/python
import commands, os
def add_keys(host):
hostkeys = {
'rsa': {
'public_key': '',
'private_key': ''
},
#!/usr/bin/python
import json
import platform
import requests
import os
#os.environ['PYTHONWARNINGS'] = 'ignore:Unverified HTTPS request'
hostname = platform.node()
Facter.add("is_ovirt_guest") do
setcode do
File.read("/sys/devices/virtual/dmi/id/product_name") =~ /oVirt Node/ rescue false
end
end
#!/bin/bash
if [ $# -lt 1 ]; then
echo "Usage: /root/newusers users.txt"
exit 1
elif [ $1 == 'users.txt' ]; then
users=`curl -s ftp://ipa.rhce.local/pub/users.txt`
for user in $users; do
useradd -s /sbin/nologin $user
done
Port forward port 8080 to another box.
firewall-cmd --zone=public --add-masquerade --permanent
firewall-cmd --zone=public --add-forward-port=port=443:proto=tcp:toport=3001 --permanent
firewall-cmd --reload
Note: This only works from *outside* of the server. You can test by connecting to port 8080 from another host.
curl http://10.8.8.72:8080
# See smb.conf.example for a more detailed config file or
# read the smb.conf manpage.
# Run 'testparm' to verify the config is correct after
# you modified it.
[global]
workgroup = DEVOPS
security = user
passdb backend = tdbsam
set nocompatible " be iMproved, required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
#!/usr/bin/perl
#redirect user to new server
use CGI qw(:standard);
my $q = CGI->new;
my $path = $q->path_info();
print $q->redirect(-url => "http://cvs2.example.com/cgi-bin/cvsweb.cgi$path");
# System authorization information
install
url --url="http://packages.example.com/pub/fedora/25/Everything/x86_64/os"
auth --enableshadow --passalgo=sha512
# Use network installation
skipx
# Run the Setup Agent on first boot
firstboot --disable
ignoredisk --only-use=sda