diff --git a/.zuul.yaml b/.zuul.yaml index 659e297185..e9b6e667db 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -262,20 +262,6 @@ files: - roles/.* -- job: - name: system-config-zuul-role-integration-trusty - parent: system-config-zuul-role-integration - nodeset: - nodes: - - name: base - label: ubuntu-trusty - - name: puppet4 - label: ubuntu-trusty - groups: - - name: puppet3 - nodes: - - base - - job: name: system-config-zuul-role-integration-xenial parent: system-config-zuul-role-integration @@ -314,13 +300,11 @@ name: system-config-zuul-role-integration check: jobs: - - system-config-zuul-role-integration-trusty - system-config-zuul-role-integration-xenial - system-config-zuul-role-integration-bionic - system-config-zuul-role-integration-debian-stable gate: jobs: - - system-config-zuul-role-integration-trusty - system-config-zuul-role-integration-xenial - system-config-zuul-role-integration-bionic - system-config-zuul-role-integration-debian-stable diff --git a/playbooks/install_puppet.yaml b/playbooks/install_puppet.yaml new file mode 100644 index 0000000000..34283954a8 --- /dev/null +++ b/playbooks/install_puppet.yaml @@ -0,0 +1,5 @@ +- hosts: all + name: "Install puppet" + gather_facts: yes + roles: + - puppet-install diff --git a/roles/puppet-install/tasks/puppet-install/CentOS.yaml b/roles/puppet-install/tasks/puppet-install/CentOS.yaml index dcb95d51ca..93bfcbcc50 100644 --- a/roles/puppet-install/tasks/puppet-install/CentOS.yaml +++ b/roles/puppet-install/tasks/puppet-install/CentOS.yaml @@ -8,7 +8,7 @@ block: - name: Install puppetlabs repo yum: - name: https://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm + name: https://release-archives.puppet.com/yum/puppetlabs-release-el-7.noarch.rpm - name: Install puppet packages yum: @@ -22,14 +22,14 @@ when: puppet_install_version == 4 become: true block: - - name: Install puppetlabs repo - yum: - name: https://yum.puppetlabs.com/puppetlabs-release-pc1-el-7.noarch.rpm - + # Puppetlabs removed the puppet4/PC1 repo and shoved the rpms into an + # archive. Install the agent rpm directly as a result + - name: "Check for puppet 4 install" + stat: + path: /opt/puppetlabs + register: puppet4_installed - name: Install puppet packages yum: - name: - - puppet-agent - - ruby + name: https://release-archives.puppet.com/yum/el/7/PC1/x86_64/puppet-agent-1.10.14-1.el7.x86_64.rpm state: present - update_cache: yes + when: not puppet4_installed.stat.exists diff --git a/roles/puppet-install/tasks/puppet-install/trusty.yaml b/roles/puppet-install/tasks/puppet-install/trusty.yaml index 3dc9aadddd..0939f93553 100644 --- a/roles/puppet-install/tasks/puppet-install/trusty.yaml +++ b/roles/puppet-install/tasks/puppet-install/trusty.yaml @@ -11,7 +11,7 @@ # at this point. - name: Install puppetlabs repo apt: - deb: http://apt.puppetlabs.com/puppetlabs-release-trusty.deb + 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: @@ -25,29 +25,16 @@ 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" + # 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: /etc/apt/sources.list.d/puppetlabs-pc1.list - register: puppet4_repo - - name: Install puppetlabs repo + path: /opt/puppetlabs + register: puppet4_installed + - name: Install puppet 4 apt: - deb: http://apt.puppetlabs.com/puppetlabs-release-pc1-trusty.deb - when: not puppet4_repo.stat.exists - - - name: Install puppet packages - apt: - name: - - puppet-agent - - ruby - update_cache: yes + 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: diff --git a/roles/puppet-install/tasks/puppet-install/xenial.yaml b/roles/puppet-install/tasks/puppet-install/xenial.yaml index d9258699b9..9083429b7a 100644 --- a/roles/puppet-install/tasks/puppet-install/xenial.yaml +++ b/roles/puppet-install/tasks/puppet-install/xenial.yaml @@ -20,29 +20,16 @@ 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" + # 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: /etc/apt/sources.list.d/puppetlabs-pc1.list - register: puppet4_repo - - name: Install puppetlabs repo + path: /opt/puppetlabs + register: puppet4_installed + - name: Install puppet 4 apt: - deb: https://apt.puppetlabs.com/puppetlabs-release-pc1-xenial.deb - when: not puppet4_repo.stat.exists - - - name: Install puppet packages - apt: - name: - - puppet-agent - - ruby - update_cache: yes + deb: https://release-archives.puppet.com/apt/pool/xenial/PC1/p/puppet-agent/puppet-agent_1.10.14-1xenial_amd64.deb + when: not puppet4_installed.stat.exists - name: Stop and disable puppet service service: diff --git a/run_all.sh b/run_all.sh index 03c4406c20..7a8d0533b7 100755 --- a/run_all.sh +++ b/run_all.sh @@ -78,15 +78,6 @@ start_timer timeout -k 2m 10m ansible-playbook ${ANSIBLE_PLAYBOOKS}/bridge.yaml send_timer bridge -# Update the puppet version -# We run this before base because base enforces the specified puppet version -# but does not transition from an older version to a newer version. -# This playbook will do the transition if necessary then base will enforce -# it going forward. -start_timer -timeout -k 2m 10m ansible-playbook -f 50 ${ANSIBLE_PLAYBOOKS}/update_puppet_version.yaml -send_timer update_puppet_version - # Run the base playbook everywhere start_timer timeout -k 2m 120m ansible-playbook -f 50 ${ANSIBLE_PLAYBOOKS}/base.yaml diff --git a/tools/prep-apply.sh b/tools/prep-apply.sh index 205d505efe..08bb9e7783 100644 --- a/tools/prep-apply.sh +++ b/tools/prep-apply.sh @@ -40,8 +40,15 @@ declare -A INTEGRATION_MODULES source $MODULE_ENV_FILE +virtualenv --system-site-packages /tmp/apply-ansible-env +/tmp/apply-ansible-env/bin/pip install ansible # Install puppet -SETUP_PIP=false sudo -E bash -x $ROOT/install_puppet.sh +inv=`mktemp` +cat > $inv <