This file contains hidden or 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
version: "3.2" | |
services: | |
puppetdb: | |
deploy: | |
replicas: 2 | |
hostname: mdct-puppetdb | |
image: docker-registry.example.com/puppetdb:latest | |
ports: | |
- 8080:8080 |
This file contains hidden or 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 commands, os | |
def add_keys(host): | |
hostkeys = { | |
'rsa': { | |
'public_key': '', | |
'private_key': '' | |
}, |
This file contains hidden or 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 json | |
import platform | |
import requests | |
import os | |
#os.environ['PYTHONWARNINGS'] = 'ignore:Unverified HTTPS request' | |
hostname = platform.node() |
This file contains hidden or 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
Facter.add("is_ovirt_guest") do | |
setcode do | |
File.read("/sys/devices/virtual/dmi/id/product_name") =~ /oVirt Node/ rescue false | |
end | |
end |
This file contains hidden or 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 | |
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 |
This file contains hidden or 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
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 |
This file contains hidden or 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
# 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 |
This file contains hidden or 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
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' |
This file contains hidden or 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/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"); |
This file contains hidden or 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
# 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 |