Procházet zdrojové kódy

Merge pull request #886 from smunilla/sudo_check

atomic-openshift-installer: Update nopwd sudo test
Brenton Leanhardt před 9 roky
rodič
revize
acb8f80afc
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      utils/src/ooinstall/openshift_ansible.py

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

@@ -82,7 +82,7 @@ def write_host(host, inventory, scheduleable=True):
     if installer_host in [host.connect_to, host.hostname, host.public_hostname]:
         facts += ' ansible_connection=local'
         if os.geteuid() != 0:
-            no_pwd_sudo = subprocess.call(['sudo', '-v', '-n'])
+            no_pwd_sudo = subprocess.call(['sudo', '-n', 'echo openshift'])
             if no_pwd_sudo == 1:
                 print 'The atomic-openshift-installer requires sudo access without a password.'
                 sys.exit(1)