'Log out of the registry. On success update the config file.
TODO: port to API once docker.py supports this.
:return: None'

def logout(self):

    cmd = ('%s    logout    ' % self.client.module.get_bin_path('docker', True))
    cmd += ("'%s'" % self.registry_url)
    (rc, out, err) = self.client.module.run_command(cmd)
    if (rc != 0):
        self.fail(('Could    not    log    out:    %s' % err))
