Skip to content

Instantly share code, notes, and snippets.

View infernix's full-sized avatar

Gerben Meijer infernix

View GitHub Profile
Homegear log (note the RPC timeouts):
```
11/04/16 01:12:06.337 RPC client: Info: Calling RPC method "system.multicall" on server 192.168.0.1.
11/04/16 01:12:06.342 RPC client: Info: Calling RPC method "system.multicall" on server 192.168.0.1.
11/04/16 01:12:15.364 RPC client: Info: Calling RPC method "system.multicall" on server 192.168.0.1.
11/04/16 01:12:15.369 RPC client: Info: Calling RPC method "system.multicall" on server 192.168.0.1.
11/04/16 01:12:17.603 RPC client: Info: Calling RPC method "system.multicall" on server 192.168.0.1.
11/04/16 01:12:17.607 RPC client: Info: Calling RPC method "system.multicall" on server 192.168.0.1.
11/04/16 01:12:21.858 RPC client: Info: Calling RPC method "system.multicall" on server 192.168.0.1.
@infernix
infernix / gist:538374924cb65c9c6d33
Created March 2, 2016 23:38
Ansible vars_files
Bootstrap:
mkdir -p vars/bar
touch vars/bar/all.yml
./hosts content:
[test]
localhost
[all:vars]
@infernix
infernix / vcsa-kvm.yml
Created February 10, 2016 19:23
Create a VMware VCSA appliance under KVM with libvirt and ansible
---
- name: Generate a KVM enabled VMWare VCSA VM under libvirt
hosts: 127.0.0.1
connection: local
vars:
- reqpkgs_apt:
- bsdtar
- libguestfs-tools
- qemu-utils
- virtinst
@infernix
infernix / sendmail.yml
Created August 1, 2015 13:08
Send one email with vars from a large play
- name: Generate log file name
hosts: all
connection: local
tasks:
- shell: mktemp
register: mktemp
always_run: yes
run_once: true
@infernix
infernix / lineinfile-race-bug.yml
Created July 10, 2015 14:52
Lineinfile race with connection: local
---
- name: Sanity check
hosts: all
connection: local
tasks:
- fail: msg="You need at least two hosts to run this play against, but more is better"
when: play_hosts|length < 2
run_once: yes
- name: Generate two tempfiles with run_once, and make a list
@infernix
infernix / ansible-reboot-and-wait.yaml
Created May 10, 2014 16:55
Make Ansible reboot remote hosts and wait for them to return
---
- name: Reboot a host and wait for it to return
hosts: somehost
remote_user: root
tasks:
# Send the reboot command
- shell: shutdown -r now
# This pause is mandatory, otherwise the existing control connection gets reused!
- pause: seconds=30