diff options
Diffstat (limited to 'modules/nspawn/manifests/os')
-rw-r--r-- | modules/nspawn/manifests/os/arch.pp | 14 | ||||
-rw-r--r-- | modules/nspawn/manifests/os/debian.pp | 49 |
2 files changed, 0 insertions, 63 deletions
diff --git a/modules/nspawn/manifests/os/arch.pp b/modules/nspawn/manifests/os/arch.pp deleted file mode 100644 index e5fc210..0000000 --- a/modules/nspawn/manifests/os/arch.pp +++ /dev/null @@ -1,14 +0,0 @@ -define nspawn::os::arch ( - String $machine = $name, -) { - - ensure_packages(['arch-install-scripts']) - - $machine_path = "/var/lib/machines/${machine}" - - exec { "/usr/bin/pacstrap '${machine_path}' base puppet": - creates => "${machine_path}/etc/os-release", - } - - nspawn::util::enable_networkd { $machine: } -} diff --git a/modules/nspawn/manifests/os/debian.pp b/modules/nspawn/manifests/os/debian.pp deleted file mode 100644 index fbab9ac..0000000 --- a/modules/nspawn/manifests/os/debian.pp +++ /dev/null @@ -1,49 +0,0 @@ -define nspawn::os::debian ( - String $os_version, - String $machine = $name, -) { - - ensure_packages(['debootstrap']) - - exec { "/usr/bin/deboostrap ${os_version} /var/lib/machines/${machine}": - creates => "/var/lib/machines/${machine}/etc/os-release", - } - - $puppet_deb = "/var/lib/machines/${machine}/tmp/puppet7-release-${os_version}.deb" - file { $puppet_deb: - ensure => file, - source => "https://apt.puppet.com/puppet7-release-${os_version}.deb" - } - - $running = $facts['machined-info'][$machine] != Undef or $facts['machined-info'][$machine]['State'] == 'running' - - if $running { - # TODO - notify { "Notify skipping ${machine} setup": - message => "Skipping setup for ${machine}, already running", - } - } else { - exec { "Set up puppet repo for ${machine}": - subscribe => File[$puppet_deb], - command => [ '/usr/bin/systemd-nspawn', - '-M', $machine, - '--quiet', - '/bin/sh', '-c', - "dpkg -i '/tmp/puppet7-release-${os_version}.deb' && apt update" - ], - } - - exec { "install puppet-agent on ${machine}": - command => [ '/usr/bin/systemd-nspawn', - '-M', $machine, - '--quiet', - 'apt', 'install', 'puppet-agent', - ], - creates => "/var/lib/machines/${machine}/opt/puppetlabs/bin/puppet", - } - } - - nspawn::util::disable_networking { $machine: } - nspawn::util::enable_networkd { $machine: } - -} |