|
| 1 | +class nebula::profile::proxmox ( |
| 2 | + String $debian_mirror = lookup('nebula::profile::apt::mirror'), |
| 3 | + Enum['pve-test', 'pve-no-subscription', 'pve-enterprise'] $pve_repo = 'pve-no-subscription', |
| 4 | + Enum['tentacle'] $ceph_release = 'tentacle', |
| 5 | +) { |
| 6 | + $pve_url_base = $pve_repo ? { |
| 7 | + 'pve-enterprise' => 'https://enterprise.proxmox.com/debian', |
| 8 | + default => 'http://download.proxmox.com/debian' |
| 9 | + } |
| 10 | + $ceph_location = "${pve_url_base}/ceph-${ceph_release}" |
| 11 | + |
| 12 | + apt::source { |
| 13 | + default: |
| 14 | + source_format => 'sources', |
| 15 | + repos => ['main', 'contrib', 'non-free-firmware'], |
| 16 | + keyring => '/usr/share/keyrings/debian-archive-keyring.gpg', |
| 17 | + ; |
| 18 | + 'debian': |
| 19 | + location => [$debian_mirror], |
| 20 | + release => [ |
| 21 | + $facts['os']['distro']['codename'], |
| 22 | + "${facts['os']['distro']['codename']}-updates", |
| 23 | + ], |
| 24 | + ; |
| 25 | + 'debian-security': |
| 26 | + location => ['http://security.debian.org/debian-security'], |
| 27 | + release => ["${facts['os']['distro']['codename']}-security"], |
| 28 | + ; |
| 29 | + } |
| 30 | + |
| 31 | + apt::source { |
| 32 | + default: |
| 33 | + source_format => 'sources', |
| 34 | + keyring => '/usr/share/keyrings/proxmox-archive-keyring.gpg', |
| 35 | + repos => [$pve_repo], |
| 36 | + ; |
| 37 | + 'proxmox': location => ["${pve_url_base}/pve"]; |
| 38 | + 'ceph': location => ["${pve_url_base}/ceph-${ceph_release}"]; |
| 39 | + } |
| 40 | +} |
0 commit comments