Skip to content

Instantly share code, notes, and snippets.

versionsix

Block or report user

Report or block versionsix

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@versionsix
versionsix / vagrant.py
Created Jul 18, 2018 — forked from lorin/vagrant.py
Vagrant dynamic inventory script for Ansible
View vagrant.py
#!/usr/bin/env python
# Adapted from Mark Mandel's implementation
# https://github.com/ansible/ansible/blob/devel/plugins/inventory/vagrant.py
import argparse
import json
import paramiko
import subprocess
import sys
@versionsix
versionsix / rst_to_md.sh
Created Jul 17, 2018 — forked from zaiste/rst_to_md.sh
Convert RST to Markdown using Pandoc
View rst_to_md.sh
FILES=*.rst
for f in $FILES
do
filename="${f%.*}"
echo "Converting $f to $filename.md"
`pandoc $f -f rst -t markdown -o $filename.md`
done
@versionsix
versionsix / ansible_ad_hoc_inventories.md
Created Jun 20, 2018 — forked from alces/ansible_ad_hoc_inventories.md
Using Ad-hoc Inventories in Ansible
View ansible_ad_hoc_inventories.md

In case you want to run ansible (or ansible-playbook) command against a set of hosts that makes sense only for one run, you can don't bother to create one-time inventory file, but simply define a comma-separated list of hosts as argument of --invertory option (or its short form that's simply -i) as follows:

ansible --inventory=myhost1,myhost2,myhost3 all -m setup -a 'filter=*name*'

(note that all in this command line stands for the target hostname)

If you have only one host to run your playbook against, your inventory string must ends with ,

@versionsix
versionsix / cymru-lookup.php
Created Apr 22, 2017 — forked from leprechau/cymru-lookup.php
testing the cymru netcat access
View cymru-lookup.php
<?php
/* test host list */
$hostlist = array(
'96.4.1.22',
'207.191.191.90',
'8.8.8.8'
);
/* do the lookup */
You can’t perform that action at this time.