24 lines
662 B
Python
24 lines
662 B
Python
from shlex import quote
|
|
|
|
|
|
@metadata_reactor.provides(
|
|
'users/build-ci/authorized_users',
|
|
)
|
|
def ssh_keys(metadata):
|
|
return {
|
|
'users': {
|
|
'build-ci': {
|
|
'authorized_users': {
|
|
f'build-server@{other_node.name}'
|
|
for other_node in repo.nodes
|
|
if other_node.has_bundle('build-server')
|
|
},
|
|
},
|
|
},
|
|
'sudoers': {
|
|
'build-ci': {
|
|
f"/usr/bin/chown -R build-ci\:{quote(ci['group'])} {quote(ci['path'])}"
|
|
for ci in metadata.get('build-ci').values()
|
|
}
|
|
},
|
|
}
|