For example:
my ansible host: 192.168.1.2
web server: eth0: 192.168.1.3, eth1: 10.1.1.3
db server: 10.1.1.4
so far, I must login web server and then (ssh db server)
if I used ansible tools, may I manage db server (10.1.1.4) throught my ansible host?
If I understand correctly, your ansible control machine cannot ssh to the db server.
the only way I can think of in order to use ansible in this case is to use “ansible pull” ; this way the db server will pull its playbook from a repository.
you can check http://www.stavros.io/posts/automated-large-scale-deployments-ansibles-pull-mo/
You can use the web machine as a jumphost, setup your .ssh/config (or you can pass one to ansible as ssh args) to use the webhost when sshing into the db host. This requires the that the transport be ssh and not paramiko, depending on your version of ssh, this is either native config or you need to use the netcat hack.
Thanks all answer.
I think ansible-pull command is fine,I like use ansible tools
在 2013年11月22日星期五UTC+8下午5时15分17秒,charles charles写道: