Hello,
I was running an older version of ansible, and I couldn’t find a way to get it to connect through a bastion host to run scripts against a destination server, so I tried upgrading ansible. (yum upgrade to 1.6.2)
Now it appears that some things don’t work the way they did eg. it doesn’t seem to recognize the hosts list properly. It used to be that the first line in the .yml file was:
- hosts: $Server_name
but, now that entry results in an error
[prod_deploy@srvtoolbox simontest]$ ansible-playbook fetch_mysql_config2.yml --extra-vars=“Server_name=jruby01”
[WARNING]: The version of gmp you have installed has a known issue regarding
timing vulnerabilities when used with pycrypto. If possible, you should update
it (ie. yum update gmp).
PLAY [$Server_name] ***********************************************************
skipping: no hosts matched
so, I can no longer pass the host name at the command line? or the syntax has changed. fine that’s a new issue i guess.
If I enter the host name in the playbook itself, it appears to work, if the host name is in the ansible list.
I’ve tried a number of methods to get it to recognize host names in ~/.ssh/config but all failed?
eg. [prod_deploy@srvtoolbox simontest]$ ansible-playbook -c ssh fetch_mysql_config2.yml
[WARNING]: The version of gmp you have installed has a known issue regarding
timing vulnerabilities when used with pycrypto. If possible, you should update
it (ie. yum update gmp).
PLAY [tmdb02] *****************************************************************
skipping: no hosts matched
PLAY RECAP ********************************************************************
my .ssh/config file:
[prod_deploy@srvtoolbox simontest]$ cat ~/.ssh/config
Host terremarkjump
HostName 208.39.105.26
User prod_deploy
Host solr4-dih
User prod_deploy
HostName 10.124.33.204
ProxyCommand ssh -q terremarkjump ncat %h 22
Host sprt_liferay_10
User prod_deploy
HostName ec2-54-202-175-96.us-west-2.compute.amazonaws.com
Host tmdb02
User prod_deploy
HostName 10.124.33.250
ProxyCommand ssh -q terremarkjump ncat %h 22
my test playbook:
- hosts: tmdb02
user: prod_deploy
sudo: yes
tasks: - name: get INVENTORY
action: fetch src=/etc/my.cnf dest=~
I looked briefly at /usr/lib/python2.6/site-packages/ansible/runner/connection_plugins/ssh.py but, I don’t know enough python to be able to tell if this has anything to do with using the ~/.ssh/config file.
Is anyone aware if the current state of ansible/ssh (not paramiko) documented in plain english, or is there a way to use jump servers via ssh with ansible 1.6.2?
It may well be that I’m doing something silly,
much obliged for any assist
Simon