mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 01:47:35 -02:30
Continue after failures to grant roles
This commit is contained in:
@@ -247,6 +247,9 @@ class ApiV2(base.Base):
|
|||||||
endpoint.post({'id': role_page['id']})
|
endpoint.post({'id': role_page['id']})
|
||||||
except exc.NoContent: # desired exception on successful (dis)association
|
except exc.NoContent: # desired exception on successful (dis)association
|
||||||
pass
|
pass
|
||||||
|
except exc.Common as e:
|
||||||
|
log.error("Role assignment failed: %s.", e)
|
||||||
|
log.debug("post_data: %r", {'id': role_page['id']})
|
||||||
|
|
||||||
def _assign_membership(self):
|
def _assign_membership(self):
|
||||||
for _page, roles in self._roles:
|
for _page, roles in self._roles:
|
||||||
@@ -288,7 +291,6 @@ class ApiV2(base.Base):
|
|||||||
except exc.Common as e:
|
except exc.Common as e:
|
||||||
log.error("Object association failed: %s.", e)
|
log.error("Object association failed: %s.", e)
|
||||||
log.debug("post_data: %r", post_data)
|
log.debug("post_data: %r", post_data)
|
||||||
raise
|
|
||||||
else: # It is a create set
|
else: # It is a create set
|
||||||
self._cache.get_page(endpoint)
|
self._cache.get_page(endpoint)
|
||||||
self._import_list(endpoint, related_set)
|
self._import_list(endpoint, related_set)
|
||||||
|
|||||||
Reference in New Issue
Block a user