bundles/apt: allow variables {os} and {os_release} in sources.list entries

This commit is contained in:
Franzi 2020-08-30 12:06:19 +02:00
parent 77051c0a0e
commit ccd4a09183
Signed by: kunsi
GPG key ID: 12E3D2136B818350
5 changed files with 14 additions and 11 deletions

View file

@ -103,7 +103,10 @@ pkg_apt = {
for name, data in node.metadata.get('apt', {}).get('repos', {}).items():
files['/etc/apt/sources.list.d/{}.list'.format(name)] = {
'content_type': 'mako',
'content': "\n".join(data['items']),
'content': ("\n".join(sorted(data['items']))).format(
os=node.os,
os_release=supported_os[node.os][node.os_version[0]],
),
'triggers': {
'action:apt_update',
},