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 python3 | |
""" | |
Name: send_logs.py | |
Description: Client test agent to generate and send unique lines to local syslog | |
""" | |
import time | |
import sys | |
import random | |
import syslog |
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 -O https://raw.githubusercontent.com/jonzobrist/Bash-Admin-Scripts/master/set-sysctl-challenge-ack.sh | |
chmod uog+x set-sysctl-challenge-ack.sh | |
sudo ./set-sysctl-challenge-ack.sh | |
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
cf3> -> Handling file existence constraints on /root/bin | |
cf3> -> Promise to skip base directory /root/bin | |
cf3> -> Basedir "/root/bin" not promising anything | |
cf3> -> Copy file /root/bin from /var/cfengine/masterfiles/inthinc/rootbin check | |
cf3> No existing connection to 192.168.8.5 is established... | |
cf3> Set cfengine port number to 5308 = 5308 | |
cf3> Set connection timeout to 30 | |
cf3> -> Connect to 192.168.8.5 = 192.168.8.5 on port 5308 | |
cf3> !! Error connecting to server (timeout) |
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 | |
# | |
# Purpose : This script takes a list of prefixes, and suffixes, creates a list of hostnames | |
# and deletes the local users key for those hosts and adds a new one. | |
# I created this for use on Amazon Web Services EC2 since we are re-using similar name aliases | |
# and need an easy way to update the ssh keys. | |
# | |
# WARNING : from man ssh-keyscan | |
# If an ssh_known_hosts file is constructed using ssh-keyscan without verifying the keys, users will be | |
# vulnerable to man in the middle attacks. On the other hand, if the security model allows such a risk, |
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
# cat /var/cfengine/masterfiles/cf-sketch-runfile-standalone.cf | |
body common control | |
{ | |
bundlesequence => { cfsketch_g, cfsketch_run }; | |
inputs => { @(cfsketch_g.inputs) }; | |
} | |
# environment common bundles |
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
############################################################################### | |
# | |
# Add a user to a group, if not already a member. If group does not exist, | |
# first create it. | |
# | |
# IMPORTANT: this bundle has only been tested against RHEL5 and AIX. It is | |
# known to fail at RHEL3, where usermod does not support the "-a" flag for | |
# appending, rather than overwriting, secondary groups to a user account. Test | |
# carefully before applying to other distros. | |
# |
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
################################ | |
# | |
# Setup sysctl.conf on servers using cf-sketch sysctl | |
# | |
# Download & Install cf-sketch and install Nick Anderson's System::sysctl sketch | |
# CFEngine Design Center https://github.com/cfengine/design-center | |
# Nick's System::syctl sketch branch | |
# https://github.com/nickanderson/design-center/tree/feature/sysctl/sketches/system/sysctl | |
# | |
# Include this in your bundlesequence {} |
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
######################################################################### | |
# | |
# linux_sudoers.cf - Watch sudoers file for changes, overwrite with master if it changes | |
# | |
# | |
# | |
# | |
######################################################################### | |
bundle agent linux_sudoers { |