You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
789 B

5 years ago
5 years ago
5 years ago
  1. #!/bin/sh
  2. apt -qqq install lsb-release curl
  3. if [ `lsb_release -sc` = 'bullseye' ]; then
  4. echo "Bullseye detected, installing repository directly"
  5. echo "# Puppet 7 buster Repository
  6. deb http://apt.puppetlabs.com bullseye puppet7" > /etc/apt/sources.list.d/puppet7.list
  7. else
  8. curl -sL -o /var/cache/apt/archives/puppet7-release-`lsb_release -c -s`.deb https://apt.puppet.com/puppet7-release-`lsb_release -c -s`.deb && dpkg -i /var/cache/apt/archives/puppet7-release-`lsb_release -c -s`.deb
  9. fi
  10. apt -qq update && apt -qqq install puppet-agent && apt clean
  11. echo "[agent]
  12. server = foreman.altinea.fr
  13. runinterval = 600
  14. listen = false
  15. pluginsync = true
  16. report = true"> /etc/puppetlabs/puppet/puppet.conf
  17. /opt/puppetlabs/bin/puppet resource service puppet ensure=running enable=true