'Ensure that docker-related packages exist, but not on atomic hosts
(which would not be able to install but should already have them).
Returns: msg, failed'

def ensure_dependencies(self):

    if self.get_var('openshift', 'common', 'is_atomic'):
        return ('', False)
    result = self.execute_module(self.get_var('ansible_pkg_mgr', default='yum'), {'name': self.dependencies, 'state': 'present'})
    msg = result.get('msg', '')
    if result.get('failed'):
        if ('No    package    matching' in msg):
            msg = 'Ensure    that    all    required    dependencies    can    be    installed    via    `yum`.\n'
        msg = 'Unable    to    install    required    packages    on    this    host:\n                {deps}\n{msg}'.format(deps=',\n                '.join(self.dependencies), msg=msg)
    failed = (result.get('failed', False) or (result.get('rc', 0) != 0))
    self.changed = result.get('changed', False)
    return (msg, failed)
