Re: [ansible-project] Re: Steps for ssh forwarding?

2018-04-09 Thread Michael Spiegle
none >> ControlPersist 10m >> >> >> >> # groups of machines that can be accessed by the above jumpboxes >> >> >> Host *.someserverbehindjumpbox.com >> ControlMaster no >> ProxyCommand ssh -S ~/.ssh/master-*@jumpboxserver:%p -W %h:%p >

Re: [ansible-project] Re: Steps for ssh forwarding?

2018-04-05 Thread Michael Spiegle
C-4, Benny Kusman wrote: > > this is a great step. > im able to establish the tunneling with the jumphost. > but i was wondering, what did you put in the hosts filfe ? > im still not able to reach the server > > On Monday, February 16, 2015 at 12:11:58 AM UTC, Michael Spiegl

[ansible-project] Obtain the user specified via '-u' cli option

2017-02-06 Thread Michael Spiegle
At some point in Ansible 2.0.x, the '{{ansible_user}}' variable would reflect the argument passed to ansible-playbook '-u'. It doesn't appear to be doing this any more, and I can't seem to find a way to obtain the value that was passed into '-u'. Is there a known way to do this? My specific

[ansible-project] Reliable way to detect when EC2 instance is ready for login

2016-06-10 Thread Michael Spiegle
When I provision an EC2 instance, I add a user_data script which drops an SSH pubkey so I can login as root. The problem is that it's difficult to tell exactly when cloud-init has been completed. Even if port 22 is accepting connections, the pubkey may not be ready yet and thus SSH logins

Re: [ansible-project] Re: Steps for ssh forwarding?

2015-02-15 Thread Michael Spiegle
As an additional datapoint, here's a brief summary of how I deal with this. To complicate matters, my machines are split across various labs in different locations which each have their own bastion/jumpbox. I use ssh keys sometimes, and hard coded passwords for some other machines:

Re: [ansible-project] Re: Steps for ssh forwarding?

2015-02-15 Thread Michael Spiegle
About half of my machines are in Amazon/EC2. In order to solve the chicken/egg problem, I write out a user_data script which installs some SSH keys for me to the root user of the VM upon first boot. This allows me to run my initial bootstrap and get the machine joined to the domain, then I

Re: [ansible-project] synchronize between 2 files on remote host uses private_key

2015-02-09 Thread Michael Spiegle
, not change any existing arguments. Did this work for you? On Monday, February 9, 2015 at 8:37:09 PM UTC-5, James Cammarata wrote: Hi Michael, have you tried setting the key option via the rsync_opts and/or rsync_path parameters to synchronize module? On Sat, Feb 7, 2015 at 10:05 AM, Michael

[ansible-project] pipelining gets disabled when ssh_args is specified

2015-02-09 Thread Michael Spiegle
My ansible.cfg contains the following right now: [ssh_connection] ssh_args = -F ssh.config pipelining = True If I run Ansible, my base role takes 02:06 (mm:ss) to run on a single host and makes many SSH connections. If I simply comment out ssh_args, pipelining works and Ansible runs in

[ansible-project] synchronize between 2 files on remote host uses private_key

2015-02-09 Thread Michael Spiegle
I have a simple task to copy a file from one path to another on a remote host. I need a private key to SSH into the remote host, but the synchronize module automatically uses my private key in the rsync command too which seems unnecessary: ansible-playbook --private-key=keys/mykey.pem

Re: [ansible-project] pipelining gets disabled when ssh_args is specified

2015-02-09 Thread Michael Spiegle
, Michael Spiegle mspi...@nauticaltech.com javascript: wrote: My ansible.cfg contains the following right now: [ssh_connection] ssh_args = -F ssh.config pipelining = True If I run Ansible, my base role takes 02:06 (mm:ss) to run on a single host and makes many SSH connections. If I simply