I think this block could be replaced by:
nsha1 = ctx.config.get('overrides', {}).get('ceph', {}).get('sha1', role_config.get('sha1')