Skip to content

Instantly share code, notes, and snippets.

View ekollof's full-sized avatar
💭
All my repos have moved to https://git.hackerheaven.org/ekollof

Emiel (Andrath) Kollof ekollof

💭
All my repos have moved to https://git.hackerheaven.org/ekollof
View GitHub Profile
@ekollof
ekollof / Dynamic python interpreter selection
Created July 28, 2016 11:29
Find python interpreter and use it (useful when mixing Linux/BSD/Solaris/etc hosts)
- hosts: all
gather_facts: false
tasks:
- raw: which {{item}}
register: mypython
ignore_errors: True
with_items:
- python
- python2
- python2.7
root@hh-management01:~ # salt-cloud --profile hh-db hh-db01
[INFO ] salt-cloud starting
[INFO ] Creating Cloud VM hh-db01
[INFO ] found private IPv4 interface for "10.129.16.64"
[INFO ] found public IPv4 interface for "95.85.10.213"
[INFO ] found public IPv6 interface for "2A03:B0C0:0000:1010:0000:0000:035F:D001"
[INFO ] Rendering deploy script: /usr/local/etc/salt/cloud.deploy.d/bootstrap-salt.sh
Warning: Permanently added '95.85.10.213' (ECDSA) to the list of known hosts.
Fri Jul 1 09:14:19 UTC 2016
Warning: Permanently added '95.85.10.213' (ECDSA) to the list of known hosts.