From c5a66e96a28cdb322ca28bb9a8c6c32bf07cfe26 Mon Sep 17 00:00:00 2001 From: Fabian Arrotin Date: Wed, 31 Oct 2012 14:43:06 +0100 Subject: [PATCH] Added the ansible_ssh_host and ansible_ssh_port variable in the patterns/inventory file --- docsite/rst/patterns.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docsite/rst/patterns.rst b/docsite/rst/patterns.rst index 81ee2072d3e..5c43c811513 100644 --- a/docsite/rst/patterns.rst +++ b/docsite/rst/patterns.rst @@ -37,6 +37,10 @@ after the hostname with a colon. four.example.com:5309 +You can also use other variables to specify your hosts (useful when using '-c ssh'). Suppose that you want to use in your inventory file the name four.example.com. That host has a sshd running on port 5309 (or have a firewall rule in front to redirect 5309->22) and is known in the DNS a four.example.org : + + four.example.com ansible_ssh_port=5309 ansible_ssh_host=four.example.org + In 0.6 and later, if you have a lot of hosts following similar patterns you can do this rather than listing each hostname:: [webservers]