bundles/apt: allow variables {os} and {os_release} in sources.list entries
This commit is contained in:
parent
77051c0a0e
commit
ccd4a09183
5 changed files with 14 additions and 11 deletions
|
@ -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',
|
||||
},
|
||||
|
|
|
@ -3,7 +3,7 @@ defaults = {
|
|||
'repos': {
|
||||
'jenkins': {
|
||||
'items': [
|
||||
'deb https://pkg.jenkins.io/debian-stable binary/',
|
||||
'deb https://pkg.jenkins.io/{os}-stable binary/',
|
||||
],
|
||||
},
|
||||
},
|
||||
|
|
|
@ -3,13 +3,13 @@ defaults = {
|
|||
'repos': {
|
||||
'nginx': {
|
||||
'items': [
|
||||
'deb http://nginx.org/packages/debian buster nginx',
|
||||
'deb http://nginx.org/packages/{os} {os_release} nginx',
|
||||
],
|
||||
},
|
||||
},
|
||||
'unattended-upgrades': {
|
||||
'origins': {
|
||||
'o=nginx,a=stable,n=buster,l=nginx,c=nginx',
|
||||
'o=nginx,a=stable,l=nginx,c=nginx',
|
||||
},
|
||||
},
|
||||
'packages': {
|
||||
|
|
|
@ -3,19 +3,19 @@ defaults = {
|
|||
'repos': {
|
||||
'yarn': {
|
||||
'items': [
|
||||
'deb https://dl.yarnpkg.com/debian/ stable main',
|
||||
'deb https://dl.yarnpkg.com/{os}/ stable main',
|
||||
],
|
||||
},
|
||||
'node': {
|
||||
'items': [
|
||||
'deb https://deb.nodesource.com/node_10.x buster main',
|
||||
'deb-src https://deb.nodesource.com/node_10.x buster main',
|
||||
'deb https://deb.nodesource.com/node_10.x {os_release} main',
|
||||
'deb-src https://deb.nodesource.com/node_10.x {os_release} main',
|
||||
],
|
||||
},
|
||||
},
|
||||
'unattended-upgrades': {
|
||||
'origins': {
|
||||
'o=Node Source,n=buster,l=Node Source,c=main',
|
||||
'o=Node Source,l=Node Source,c=main',
|
||||
'o=yarn,a=stable,n=stable,l=yarn-stable,c=main',
|
||||
},
|
||||
},
|
||||
|
|
|
@ -48,7 +48,7 @@ nodes['htz.ex42-1048908'] = {
|
|||
'backports': {
|
||||
'install_gpg_key': False, # default debian signing key
|
||||
'items': [
|
||||
'deb http://deb.debian.org/debian buster-backports main',
|
||||
'deb http://deb.debian.org/debian {os_release}-backports main',
|
||||
],
|
||||
},
|
||||
'miniflux': {
|
||||
|
@ -58,12 +58,12 @@ nodes['htz.ex42-1048908'] = {
|
|||
},
|
||||
'rspamd': {
|
||||
'items': {
|
||||
'deb [arch=amd64] http://rspamd.com/apt-stable/ buster main',
|
||||
'deb [arch=amd64] http://rspamd.com/apt-stable/ {os_release} main',
|
||||
},
|
||||
},
|
||||
'weechat': {
|
||||
'items': {
|
||||
'deb https://weechat.org/debian buster main',
|
||||
'deb https://weechat.org/debian {os_release} main',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue