Interactive SSH for Ansible
Project description
Adds interactive SSH capabilities to Ansible, especially useful in setups with VMs in private subnets accessible only via jumphosts.
Requirements
ansible
pip
Usage
Run with -h for command-line help:
usage: ansible-ssh [-h] [--inventory INVENTORY] [--key-file KEYFILE] [--user USER] [--verbose] [--become] host positional arguments: host the host to ssh into optional arguments: -h, --help show this help message and exit --inventory INVENTORY, -i INVENTORY ansible inventory file to use instead of the one defined in ansible.cfg --key-file KEYFILE, -k KEYFILE ssh private key file to use instead of the default for the user --user USER, -u USER, -l USER override the user defined in ansible inventory file --verbose, -v pass verbose flag to ssh command --become, -b ssh as root instead of the inventory-supplied account
Example
$ ansible-ssh lb-0
executing ssh -C -o ControlMaster=auto -o ControlPersist=60s -o ProxyCommand="ssh -W %h:%p -q ubuntu@10.200.100.60" -l ubuntu 192.168.1.30
Last login: Sat May 25 15:40:13 2019 from 192.168.1.100
ubuntu@lb-0:~$
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for ansible_ssh-0.3-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50cac05ecca0aa09c14794d9a01fbbf5abc165f35c0731a8184b2960eac63dec |
|
MD5 | 2d9e32bb14641be63f3c18069b2a0d4c |
|
BLAKE2b-256 | eec8448456f9bdc122df78edc1511dc6f3cb247e56534a334f4e0400dcc897ea |