summaryrefslogtreecommitdiffstats
path: root/roles/lib_openshift/src
diff options
context:
space:
mode:
authorOpenShift Bot <eparis+openshiftbot@redhat.com>2017-05-30 21:35:25 -0500
committerGitHub <noreply@github.com>2017-05-30 21:35:25 -0500
commitce90c55beba2e0b0e72945f99cca0ed60e1fe0a3 (patch)
tree6fce26b97b16069d0dd7359b42427a1b6d1bc1ff /roles/lib_openshift/src
parent14d4e10132307bb60daaee71cfec719486f2fdb5 (diff)
parent1898489b4c2bb63ee7a4e284a4f7c1b5710e8d5b (diff)
downloadopenshift-ce90c55beba2e0b0e72945f99cca0ed60e1fe0a3.tar.gz
openshift-ce90c55beba2e0b0e72945f99cca0ed60e1fe0a3.tar.bz2
openshift-ce90c55beba2e0b0e72945f99cca0ed60e1fe0a3.tar.xz
openshift-ce90c55beba2e0b0e72945f99cca0ed60e1fe0a3.zip
Merge pull request #4272 from ashcrow/system-package-no-hardcode
Merged by openshift-bot
Diffstat (limited to 'roles/lib_openshift/src')
-rw-r--r--roles/lib_openshift/src/ansible/oc_atomic_container.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/roles/lib_openshift/src/ansible/oc_atomic_container.py b/roles/lib_openshift/src/ansible/oc_atomic_container.py
index 20d75cb63..1a5ab6869 100644
--- a/roles/lib_openshift/src/ansible/oc_atomic_container.py
+++ b/roles/lib_openshift/src/ansible/oc_atomic_container.py
@@ -9,7 +9,9 @@ from ansible.module_utils.basic import AnsibleModule
def _install(module, container, image, values_list):
''' install a container using atomic CLI. values_list is the list of --set arguments.
container is the name given to the container. image is the image to use for the installation. '''
- args = ['atomic', 'install', "--system", '--name=%s' % container] + values_list + [image]
+ # NOTE: system-package=no is hardcoded. This should be changed to an option in the future.
+ args = ['atomic', 'install', '--system', '--system-package=no',
+ '--name=%s' % container] + values_list + [image]
rc, out, err = module.run_command(args, check_rc=False)
if rc != 0:
return rc, out, err, False
@@ -93,7 +95,9 @@ def core(module):
module.fail_json(rc=rc, msg=err)
return
- containers = json.loads(out)
+ # NOTE: "or '[]' is a workaround until atomic containers list --json
+ # provides an empty list when no containers are present.
+ containers = json.loads(out or '[]')
present = len(containers) > 0
old_image = containers[0]["image_name"] if present else None