
As per [1], it seems puppet has "cleaned up" most of the packages we are using to install. Install the puppet-agent packages directly as puppet's archive location is not a valid repo. With puppet 4 at least these packages should bundle everything we need including ruby. [1] https://groups.google.com/forum/#!msg/puppet-users/cCsGWKunBe4/OdG0T7LeDAAJ Depends-On: https://review.opendev.org/659384 Depends-On: https://review.opendev.org/659395 Change-Id: Ie9e2b79b42f397bddd960ccdc303b536155ce123
45 lines
1.3 KiB
YAML
45 lines
1.3 KiB
YAML
- fail:
|
|
msg: "Unsupported puppet version '{{ puppet_install_version }}' on this platform"
|
|
when: puppet_install_version not in [3, 4]
|
|
|
|
- name: Install puppet 3 packages
|
|
when: puppet_install_version == 3
|
|
become: true
|
|
block:
|
|
# Note https doesn't work here due to certificate issues and
|
|
# python versions and SNI etc; not worth the effort of workarounds
|
|
# at this point.
|
|
- name: Install puppetlabs repo
|
|
apt:
|
|
deb: http://release-archives.puppet.com/apt/pool/trusty/puppet/p/puppet-release/puppet-release_1.0.0-3trusty_all.deb
|
|
|
|
- name: Install puppet packages
|
|
package:
|
|
state: present
|
|
name:
|
|
- puppet
|
|
- ruby
|
|
|
|
- name: Install puppet 4 packages
|
|
when: puppet_install_version == 4
|
|
become: true
|
|
block:
|
|
|
|
# Puppetlabs removed the puppet4/PC1 repo and shoved the debs into an
|
|
# archive. Install the agent deb directly as a result
|
|
- name: "Check for puppet 4 install"
|
|
stat:
|
|
path: /opt/puppetlabs
|
|
register: puppet4_installed
|
|
- name: Install puppet 4
|
|
apt:
|
|
deb: https://release-archives.puppet.com/apt/pool/trusty/PC1/p/puppet-agent/puppet-agent_1.10.14-1trusty_amd64.deb
|
|
when: not puppet4_installed.stat.exists
|
|
|
|
- name: Stop and disable puppet service
|
|
service:
|
|
name: puppet
|
|
state: stopped
|
|
enabled: no
|
|
become: yes
|