瀏覽代碼

ooinstall: Update local install check

Update to check both hostname and public_hostname.
Remove ansible_sudo=no as I failed to notice we were already checking
if ansible_ssh_user == 'root' and setting it there.
Samuel Munilla 9 年之前
父節點
當前提交
ef6df72206
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      utils/src/ooinstall/openshift_ansible.py

+ 2 - 2
utils/src/ooinstall/openshift_ansible.py

@@ -44,9 +44,9 @@ def generate_inventory(hosts):
     if 'OO_INSTALL_STAGE_REGISTRY' in os.environ:
         base_inventory.write('oreg_url=registry.access.stage.redhat.com/openshift3/ose-${component}:${version}\n')
 
-    if any(host.hostname == installer_host for host in hosts):
+    if any(host.hostname == installer_host or host.public_hostname == installer_host
+            for host in hosts):
         base_inventory.write("ansible_connection=local\n")
-        base_inventory.write("ansible_sudo=no\n")
 
     base_inventory.write('\n[masters]\n')
     masters = (host for host in hosts if host.master)