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.

23 lines
960 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. Types: deb
  7. URIs: http://apt.puppetlabs.com
  8. Suites: bullseye
  9. Components: puppet7
  10. Signed-By: /usr/share/keyrings/puppet-keyring.gpg" > /etc/apt/sources.list.d/puppet7.sources
  11. curl -o /usr/share/keyrings/puppet-keyring.gpg https://apt.puppet.com/keyring.gpg
  12. else
  13. 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
  14. fi
  15. apt -qq update && apt -qqq install puppet-agent && apt clean
  16. echo "[agent]
  17. server = foreman.altinea.fr
  18. runinterval = 600
  19. listen = false
  20. pluginsync = true
  21. report = true"> /etc/puppetlabs/puppet/puppet.conf
  22. /opt/puppetlabs/bin/puppet resource service puppet ensure=running enable=true