Fix puppet-agent install

The previous declaration where we installed the puppet-agent was after
we revoked sudo access. We need this to be part of the node setup so we
need to move it out of the build run and to the node setup playbooks.

Depends-On: I2fb0301631eb69bd1e37467229bcf3dc4ab532bb
Change-Id: Id68ee1b443a4172d0c1d6d58a04908c52a566623
This commit is contained in:
Alex Schultz 2017-10-17 15:22:20 -06:00 committed by Mohammed Naser
parent 5a7f531790
commit c586caffa7
No known key found for this signature in database
GPG Key ID: 481CBC90384AEC42
3 changed files with 47 additions and 29 deletions

View File

@ -1,6 +1,8 @@
- job: - job:
name: puppet-openstack-base name: puppet-openstack-base
pre-run: playbooks/prepare-node-common pre-run: playbooks/prepare-node-common
vars:
use_puppetlabs: False
- job: - job:
name: puppet-openstack-integration-base name: puppet-openstack-integration-base
@ -311,11 +313,27 @@
name: puppet-openstack-lint name: puppet-openstack-lint
parent: puppet-openstack-module-base parent: puppet-openstack-module-base
run: playbooks/run-lint-tests run: playbooks/run-lint-tests
irrelevant-files:
- ^.*\.md$
- ^.*\.rst$
- ^doc/.*$
- ^etc/.*$
- ^metadata.json$
- ^releasenotes/.*$
- ^test-requirements.txt$
- job: - job:
name: puppet-openstack-syntax name: puppet-openstack-syntax
parent: puppet-openstack-module-base parent: puppet-openstack-module-base
run: playbooks/run-syntax-tests run: playbooks/run-syntax-tests
irrelevant-files:
- ^.*\.md$
- ^.*\.rst$
- ^doc/.*$
- ^etc/.*$
- ^metadata.json$
- ^releasenotes/.*$
- ^test-requirements.txt$
- job: - job:
name: puppet-openstack-syntax-3-legacy name: puppet-openstack-syntax-3-legacy
@ -335,6 +353,8 @@
parent: puppet-openstack-module-base parent: puppet-openstack-module-base
run: playbooks/run-build-tests run: playbooks/run-build-tests
files: ^metadata.json$ files: ^metadata.json$
vars:
use_puppetlabs: True
- project-template: - project-template:
name: puppet-openstack-check-jobs name: puppet-openstack-check-jobs
@ -355,4 +375,4 @@
name: openstack/puppet-openstack-integration name: openstack/puppet-openstack-integration
templates: templates:
- puppet-openstack-check-jobs - puppet-openstack-check-jobs
- puppet-openstack-integration-jobs-all - puppet-openstack-integration-jobs-all

View File

@ -37,4 +37,26 @@
- libxml2-dev - libxml2-dev
- libxslt-dev - libxslt-dev
- ruby-dev - ruby-dev
- zlib1g-dev - zlib1g-dev
- name: Install puppetlabs puppet-agent
shell:
cmd: |
set -e
set -x
if [ -f /usr/bin/yum ]; then
yum install -y https://yum.puppetlabs.com/puppetlabs-release-pc1-el-7.noarch.rpm
yum install -y puppet-agent
elif [ -f /usr/bin/apt-get ]; then
wget https://apt.puppetlabs.com/puppetlabs-release-pc1-xenial.deb -O /tmp/puppet.deb
dpkg -i /tmp/puppet.deb
apt-get update
apt-get install puppet-agent
rm -rf /tmp/puppet.deb
fi
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
become: true
when:
- use_puppetlabs

View File

@ -1,29 +1,5 @@
- hosts: all - hosts: all
tasks: tasks:
- shell: - shell: /opt/puppetlabs/bin/puppet module build .
cmd: | args:
set -e chdir: '{{ zuul.project.src_dir }}'
set -x
if [ -f /usr/bin/yum ]; then
sudo yum install -y https://yum.puppetlabs.com/puppetlabs-release-pc1-el-7.noarch.rpm
sudo yum install -y puppet-agent
elif [ -f /usr/bin/apt-get ]; then
wget https://apt.puppetlabs.com/puppetlabs-release-pc1-xenial.deb -O /tmp/puppet.deb
sudo dpkg -i /tmp/puppet.deb
sudo apt-get update
sudo apt-get install puppet-agent
rm -rf /tmp/puppet.deb
fi
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
set -e
set -x
cd $ZUUL_PROJECT
puppet module build .
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'