Merge "Skip installing puppetlabs repos if they exist"

This commit is contained in:
Zuul 2019-04-09 16:43:45 +00:00 committed by Gerrit Code Review
commit 2da4255e33
2 changed files with 28 additions and 0 deletions

View File

@ -24,9 +24,23 @@
when: puppet_install_version == 4
become: true
block:
# The puppetlabs-release-pc1 deb install below unfortunatley isn't
# idempotent. If you install the puppet repo with this deb and
# then upgrade, you pull in a new version of
# puppetlabs-release-pc1 ... now ansible gets upset because we're
# trying to downgrade the package. This could be fixed by puppet
# symlinking the version at the top-level to the latest .deb
# ... or we just skip installing it if we seem to have the repo
# already.
- name: "Check for puppet 4 repo"
stat:
path: /etc/apt/sources.list.d/puppetlabs-pc1.list
register: puppet4_repo
- name: Install puppetlabs repo
apt:
deb: http://apt.puppetlabs.com/puppetlabs-release-pc1-trusty.deb
when: not puppet4_repo.stat.exists
- name: Install puppet packages
apt:

View File

@ -19,9 +19,23 @@
when: puppet_install_version == 4
become: true
block:
# The puppetlabs-release-pc1 deb install below unfortunatley isn't
# idempotent. If you install the puppet repo with this deb and
# then upgrade, you pull in a new version of
# puppetlabs-release-pc1 ... now ansible gets upset because we're
# trying to downgrade the package. This could be fixed by puppet
# symlinking the version at the top-level to the latest .deb
# ... or we just skip installing it if we seem to have the repo
# already.
- name: "Check for puppet 4 repo"
stat:
path: /etc/apt/sources.list.d/puppetlabs-pc1.list
register: puppet4_repo
- name: Install puppetlabs repo
apt:
deb: https://apt.puppetlabs.com/puppetlabs-release-pc1-xenial.deb
when: not puppet4_repo.stat.exists
- name: Install puppet packages
apt: