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: balancer | |
sudo: yes | |
serial: 1 | |
vars: | |
switch: False | |
name_of_handler: "{{ 'call_this' if switch else 'call_that' }}" | |
handlers: |
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 | |
for a in `ls -1` | |
do | |
pushd $(dirname $a) | |
echo ========== `pwd` | |
npm install | |
popd | |
done |
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 | |
sudo virt-install --connect qemu:///system \ | |
-n mytest \ | |
-r 4096 \ | |
--vcpus=4 \ | |
--disk path=/home/vm/images/my_test.img,size=40 \ | |
--graphics vnc,listen=0.0.0.0 \ | |
--noautoconsole \ | |
--os-type linux \ |
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 | |
virt-clone --original test_base \ | |
--name new_test \ | |
--file /home/vm/images/new_test.img \ | |
--auto-clone |
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
# Currently there is a bug (fixed in virt-manager-1.3.2-1.el7) so you will need to edit the xml to remove the channel definition: | |
NAME=new_test | |
virsh dumpxml ${NAME} > ${NAME}.xml | |
virsh undefine ${NAME} | |
vi ${NAME}.xml ; virsh define ${NAME}.xml ; virsh start ${NAME} |
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
openssl genrsa -out server.key 4096 | |
openssl req -new -key server.key -out server.csr | |
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt | |
Now copy to the right config folder: | |
cp server.crt /<configuration folder>/ssl.crt | |
cp server.key /<configuration folder>/ssl.key |
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: balancer | |
sudo: yes | |
serial: 1 | |
vars: | |
switch: False | |
name_of_handler: "{{ 'call_this' if switch else 'call_that' }}" | |
handlers: |
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 | |
set -x | |
systemctl stop $1 | |
systemctl disable $1 | |
systemctl daemon-reload | |
systemctl reset-failed | |
systemctl status $1 && exit 1 | |
ls -l /etc/systemd/system/$1* |
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 | |
HOST=my_registry | |
getJsonVal () { | |
python -c "import json,sys;sys.stdout.write(json.dumps(json.load(sys.stdin)$1))"; | |
} | |
get_tags () { | |
i_name=$1 |
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
# ┌───────────── min (0 - 59) | |
# │ ┌────────────── hour (0 - 23) | |
# │ │ ┌─────────────── day of month (1 - 31) | |
# │ │ │ ┌──────────────── month (1 - 12) | |
# │ │ │ │ ┌───────────────── day of week (0 - 6) (0 to 6 are Sunday to Saturday, or use names; 7 is Sunday, the same as 0) | |
# │ │ │ │ │ | |
# │ │ │ │ │ | |
# * * * * * command to execute |
OlderNewer