- change /etc/hosts to meet proxmox requirements - add proxmox node role - add init, params, repo, install, clusterjoin classes
38 lines
1.0 KiB
Puppet
38 lines
1.0 KiB
Puppet
# profiles::proxmox::repos
|
|
class profiles::proxmox::repos {
|
|
|
|
# include params class
|
|
include profiles::proxmox::params
|
|
|
|
$codename = $facts['os']['distro']['codename']
|
|
|
|
exec { 'download-proxmox-gpg-key':
|
|
command => "/usr/bin/wget https://enterprise.proxmox.com/debian/proxmox-release-${codename}.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-${codename}.gpg",
|
|
creates => "/etc/apt/trusted.gpg.d/proxmox-release-${codename}.gpg",
|
|
path => ['/usr/bin', '/bin'],
|
|
require => File['/etc/apt/trusted.gpg.d/'],
|
|
}
|
|
|
|
file { '/etc/apt/trusted.gpg.d/':
|
|
ensure => 'directory',
|
|
}
|
|
|
|
apt::source { 'proxmox':
|
|
location => 'http://download.proxmox.com/debian/pve',
|
|
repos => 'pve-no-subscription',
|
|
include => {
|
|
src => false,
|
|
},
|
|
}
|
|
|
|
if $profiles::proxmox::params::pve_ceph_repos {
|
|
apt::source { 'ceph':
|
|
location => "http://download.proxmox.com/debian/ceph-${profiles::proxmox::params::pve_ceph_release}",
|
|
repos => 'no-subscription',
|
|
include => {
|
|
src => false,
|
|
},
|
|
}
|
|
}
|
|
}
|