#!/bin/sh
cat > /etc/apt/sources.list <<-EOF
deb https://www2.server.pink/debian/ bookworm main contrib non-free non-free-firmware
deb-src https://www2.server.pink/debian/ bookworm main contrib non-free non-free-firmware
deb https://www2.server.pink/debian/ bookworm-updates main contrib non-free non-free-firmware
deb-src https://www2.server.pink/debian/ bookworm-updates main contrib non-free non-free-firmware
deb http://www2.server.pink/debian bookworm-backports main contrib non-free non-free-firmware
deb-src http://www2.server.pink/debian bookworm-backports main contrib non-free non-free-firmware
deb https://security.debian.org/debian-security bookworm-security main
deb-src https://security.debian.org/debian-security bookworm-security main
EOF
cd /root
apt-get update && apt-get install puppet-agent -y
cat > /etc/puppet/puppet.conf <<-EOF
[main]

[agent]
pluginsync      = true
report          = true
ignoreschedules = true
ca_server       = puppetserver-service.default.svc.k8s.digiworks.se
environment     = production
server          = puppetserver-service.default.svc.k8s.digiworks.se
EOF
puppet agent -t --waitforcert 5
