genpass ()
{
local _size=$1 # size of the password - default(16)
local _count=$2 # how many passwords to generate - default(fill your terminal screen)
local _rc _rows _width _cols
: ${_size:=16}
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
--- | |
# vim: ts=2 sw=2 ai expandtab | |
- name: Register to Satellite | |
hosts: "{{ workflow_hosts | default('all') }}" | |
connection: smart | |
gather_facts: true | |
become: true | |
vars_files: | |
- satellite_credentials.yml |
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 | |
# vim: sw=4 ts=4 expandtab | |
# modifed from https://www.baeldung.com/linux/read-process-memory | |
err() { echo "$@" >&2 ; exit 1; } | |
test -z "$1" && err "Usage: $0 <pid>" | |
test -d "/proc/$1" || err "PID $1 does not exist" | |
while read -r mem_range perms JUNK ; do | |
if [[ "$perms" == "r"* ]]; then |
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
# put this in .bashrc | |
# - or - | |
# mkdir ~/.bashrc.d | |
# put it in ~/.bashrc.d/sshtmp.bash | |
sshtmp () | |
{ | |
echo "About to temporarily connect to host" > /dev/tty; | |
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "$@" | |
} |
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
### | |
### Use any of the following to programmatically obtain the primary interface ip address | |
### | |
# using ansible facts module | |
# requires: jq | |
ansible -msetup -i localhost, all -o | cut -d'>' -f 2- | jq .ansible_facts.ansible_default_ipv4.address | xargs echo | |
# ip command and bash | |
# requires: iproute |
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 | |
# This will build a container image based on RHEL 7.5 | |
# for use in AWS with RHUI | |
DEFAULT_FROM=rhel7/rhel:7.5 | |
DEFAULT_TAG='devel/rhel:latest' | |
BZ='https://bugzilla.redhat.com/show_bug.cgi?id=1498628' | |
declare -r DEFAULT_FROM DEFAULT_TAG BZ |
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
# vim: sw=2 ai expandtab | |
--- | |
- name: Randomize Satellite Username and Password | |
hosts: satellites | |
gather_facts: false | |
connection: smart | |
become: false | |
force_handlers: True |
- Binary Builds
oc new-build --binary=true --name=ola2 --image-stream=redhat-openjdk18-openshift
oc start-build ola2 --from-file=./target/ola.jar --follow
oc new-app
- Turn off/on DC triggers to do a batch of changes without spam many deployments