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
do_cmd_timeout_retry() { | |
local RETRIES=0 | |
local MAX_RETRIES=10 | |
local TIMEOUT=60 | |
local DELAY=60 | |
while [[ $RETRIES -le $MAX_RETRIES ]]; do | |
timeout ${TIMEOUT} "$@" | |
local ret=$? |
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
- hosts: localhost | |
gather_facts: false | |
vars: | |
bla: | |
keys: | |
- 1 | |
- 2 | |
tasks: | |
- debug: | |
msg: "{{ bla['keys'][0] }}" |
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
NAME="Red Hat Enterprise Linux Server" | |
VERSION="7.4 (Maipo)" | |
ID="rhel" | |
ID_LIKE="fedora" | |
VARIANT="Server" | |
VARIANT_ID="server" | |
VERSION_ID="7.4" | |
PRETTY_NAME=OpenShift | |
ANSI_COLOR="0;31" | |
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.4:GA:server" |
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/sh | |
# | |
# Delete a VPC and its dependencies | |
REGION=eu-central-1 | |
REGION=us-west-2 | |
REGION=ap-southeast-1 | |
export AWS_PROFILE=sandbox37 | |
export AWS_PROFILE=sandbox29 |
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 | |
if [ -z "$1" ] || [ -z "$2" ]; then | |
echo "${0} QUBE VOLUME" | |
exit 2 | |
fi | |
set -xeu -o pipefail | |
volume=$(qvm-block | awk "/${2}/{print \$1}") | |
UUID=$(sudo blkid /dev/mapper/${2} -sUUID -ovalue) |
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
PLAY [localhost] ****************************************************************************************************************************************************************************** | |
TASK [set_fact] ******************************************************************************************************************************************************************************* | |
ok: [localhost] | |
TASK [include_role : /tmp/testrole] *********************************************************************************************************************************************************** | |
TASK [/tmp/testrole : set_fact] ******************************** |
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/expect | |
spawn ssh $argv | |
expect "password" | |
send "mypassword\n\r" | |
expect "$ " | |
interact |
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
--- /tmp/2 2017-04-11 18:10:47.675418352 +0200 | |
+++ /tmp/3 2017-04-11 18:10:58.305348455 +0200 | |
@@ -4,7 +4,6 @@ | |
- ^{{\s*(\w*)\s*}}$ | |
- 32 | |
_available_variables: | |
- _raw_params: ./block1.yml | |
ansible_accelerate_port: 5099 | |
ansible_check_mode: false | |
ansible_connection: local |
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
--- | |
- block: | |
- name: first block | |
debug: | |
msg: "first block, first task" | |
listen: "first block" | |
when: | |
- test1 |