This file contains hidden or 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: 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 |
This file contains hidden or 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
| 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" |
This file contains hidden or 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
| 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 |