Browse Source

Merge pull request #4583 from giuseppe/fix-invocation-atomic-v

oc_atomic_container: fix version check for atomic
Scott Dodson 7 years ago
parent
commit
7bbff6ce7d

+ 1 - 1
roles/lib_openshift/library/oc_atomic_container.py

@@ -194,7 +194,7 @@ def main():
         )
 
     # Verify that the platform supports atomic command
-    rc, version_out, err = module.run_command('atomic -v', check_rc=False)
+    rc, version_out, err = module.run_command('rpm -q --queryformat "%{VERSION}\n" atomic', check_rc=False)
     if rc != 0:
         module.fail_json(msg="Error in running atomic command", err=err)
     # This module requires atomic version 1.17.2 or later

+ 1 - 1
roles/lib_openshift/src/ansible/oc_atomic_container.py

@@ -130,7 +130,7 @@ def main():
         )
 
     # Verify that the platform supports atomic command
-    rc, version_out, err = module.run_command('atomic -v', check_rc=False)
+    rc, version_out, err = module.run_command('rpm -q --queryformat "%{VERSION}\n" atomic', check_rc=False)
     if rc != 0:
         module.fail_json(msg="Error in running atomic command", err=err)
     # This module requires atomic version 1.17.2 or later