Skip to content

Instantly share code, notes, and snippets.

View suederat's full-sized avatar

Michael Winter suederat

  • Rubrik Inc.
  • Palo Alto, CA
  • 08:41 (UTC -08:00)
View GitHub Profile
@suederat
suederat / gist:71033aa71d0d6f80da7e
Created January 18, 2015 06:16
add mounted python to ttylinux path using raw
---
- hosts: vm
description: add-python to path
gather_facts: no
vars:
toolchain_python: /build/toolchain/lin32/python-2.7.6
tasks:
- name: fix path so we have python
raw: echo "export PATH={{ toolchain_python }}/bin:\$PATH >/etc/profile.d/ansible_path.sh"
- name: fix short-sighted profile path
@suederat
suederat / gist:e32a608bf88def95184f
Created January 16, 2015 19:15
cloud inventory
def parse_options(args):
parser = OptionParser()
parser.add_option('-l', '--list', default=False, dest="list_hosts", action="store_true")
parser.add_option('-H', '--host', default=None, dest="host")
parser.add_option('-e', '--extra-vars', default=None, dest="extra")
options, args = parser.parse_args(args)
return options,args
guestbase="testrunner"
@suederat
suederat / README
Created August 7, 2014 19:18
hack to make esx able to run commands from ansible!
Get access to esx cli thru ansible, without patching ansible to not fail on grp and platform by placing modules on esx
This does not overcome fail of setup, which will rely heavily on platform, but it at least permits basic cli access. For example
# ansible -i inventory esx1 -u root -a '/bin/vim-cmd vmsvc/getallvms'
#hosts:
[hv]
esx1