release -> codename
This commit is contained in:
parent
0667304dd7
commit
d8963141fc
9 changed files with 16 additions and 16 deletions
|
@ -68,7 +68,7 @@ for host, sources in hosts.items():
|
|||
files[f'/etc/apt/sources.list.d/{host}.list'] = {
|
||||
'content': '\n'.join(sorted(set(
|
||||
str(source).format(
|
||||
release=node.metadata.get('os_release'),
|
||||
codename=node.metadata.get('os_codename'),
|
||||
version=node.os_version[0], # WIP crystal
|
||||
)
|
||||
for source in sources
|
||||
|
@ -95,7 +95,7 @@ for package, options in node.metadata.get('apt/packages', {}).items():
|
|||
files[f'/etc/apt/preferences.d/{package}'] = {
|
||||
'content': '\n'.join([
|
||||
f"Package: {package}",
|
||||
f"Pin: release a={node.metadata.get('os_release')}-backports",
|
||||
f"Pin: release a={node.metadata.get('os_codename')}-backports",
|
||||
f"Pin-Priority: 900",
|
||||
]),
|
||||
'needed_by': [
|
||||
|
|
|
@ -9,7 +9,7 @@ defaults = {
|
|||
'monitoring-plugins': {},
|
||||
},
|
||||
'sources': {
|
||||
'deb https://packages.icinga.com/debian icinga-{release} main',
|
||||
'deb https://packages.icinga.com/debian icinga-{codename} main',
|
||||
},
|
||||
},
|
||||
'icinga2': {
|
||||
|
|
|
@ -14,7 +14,7 @@ defaults = {
|
|||
'icingaweb2-module-monitoring': {},
|
||||
},
|
||||
'sources': {
|
||||
'deb https://packages.icinga.com/debian icinga-{release} main',
|
||||
'deb https://packages.icinga.com/debian icinga-{codename} main',
|
||||
},
|
||||
},
|
||||
'icingaweb2': {
|
||||
|
|
|
@ -7,7 +7,7 @@ defaults = {
|
|||
'influxdb2-cli': {},
|
||||
},
|
||||
'sources': {
|
||||
'deb https://repos.influxdata.com/debian {release} stable',
|
||||
'deb https://repos.influxdata.com/debian {codename} stable',
|
||||
},
|
||||
},
|
||||
'nftables': {
|
||||
|
|
|
@ -23,8 +23,8 @@ def sources(metadata):
|
|||
return {
|
||||
'apt': {
|
||||
'sources': {
|
||||
f'deb https://deb.nodesource.com/node_{version}.x {{release}} main',
|
||||
f'deb-src https://deb.nodesource.com/node_{version}.x {{release}} main',
|
||||
f'deb https://deb.nodesource.com/node_{version}.x {{codename}} main',
|
||||
f'deb-src https://deb.nodesource.com/node_{version}.x {{codename}} main',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -95,11 +95,11 @@ defaults = {
|
|||
'apt/sources',
|
||||
)
|
||||
def apt(metadata):
|
||||
release = {
|
||||
codename = {
|
||||
'buster': 'buster',
|
||||
'bullseye': 'bullseye',
|
||||
'bookworm': 'bullseye',
|
||||
}[metadata.get('os_release')]
|
||||
}[metadata.get('os_codename')]
|
||||
|
||||
return {
|
||||
'apt': {
|
||||
|
@ -107,7 +107,7 @@ def apt(metadata):
|
|||
'telegraf': {},
|
||||
},
|
||||
'sources': {
|
||||
f"deb https://repos.influxdata.com/debian {release} stable",
|
||||
f"deb https://repos.influxdata.com/debian {codename} stable",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
'postgresql': {
|
||||
'version': '13',
|
||||
},
|
||||
'os_release': 'bullseye',
|
||||
'os_codename': 'bullseye',
|
||||
},
|
||||
'os_version': (11,),
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
'postgresql': {
|
||||
'version': '14',
|
||||
},
|
||||
'os_release': 'bookworm',
|
||||
'os_codename': 'bookworm',
|
||||
},
|
||||
'os_version': (12,),
|
||||
}
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
'metadata': {
|
||||
'apt': {
|
||||
'sources': {
|
||||
'deb https://deb.debian.org/debian {release} main contrib non-free',
|
||||
'deb https://deb.debian.org/debian {release}-updates main contrib non-free',
|
||||
'deb https://deb.debian.org/debian {release}-backports main contrib non-free',
|
||||
'deb https://security.debian.org/ {release}-security main contrib non-free',
|
||||
'deb https://deb.debian.org/debian {codename} main contrib non-free',
|
||||
'deb https://deb.debian.org/debian {codename}-updates main contrib non-free',
|
||||
'deb https://deb.debian.org/debian {codename}-backports main contrib non-free',
|
||||
'deb https://security.debian.org/ {codename}-security main contrib non-free',
|
||||
},
|
||||
'packages': {
|
||||
'mtr-tiny': {},
|
||||
|
|
Loading…
Reference in a new issue