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.
Change-Id: Id68ee1b443a4172d0c1d6d58a04908c52a566623
(cherry picked from commit 536643ea9c
)
This commit is contained in:
parent
39b679edd3
commit
d1cc2198b0
20
.zuul.yaml
20
.zuul.yaml
@ -1,6 +1,8 @@
|
||||
- job:
|
||||
name: puppet-openstack-base
|
||||
pre-run: playbooks/prepare-node-common.yaml
|
||||
vars:
|
||||
use_puppetlabs: False
|
||||
|
||||
- job:
|
||||
name: puppet-openstack-integration-base
|
||||
@ -307,11 +309,27 @@
|
||||
name: puppet-openstack-lint
|
||||
parent: puppet-openstack-module-base
|
||||
run: playbooks/run-lint-tests.yaml
|
||||
irrelevant-files:
|
||||
- ^.*\.md$
|
||||
- ^.*\.rst$
|
||||
- ^doc/.*$
|
||||
- ^etc/.*$
|
||||
- ^metadata.json$
|
||||
- ^releasenotes/.*$
|
||||
- ^test-requirements.txt$
|
||||
|
||||
- job:
|
||||
name: puppet-openstack-syntax
|
||||
parent: puppet-openstack-module-base
|
||||
run: playbooks/run-syntax-tests.yaml
|
||||
irrelevant-files:
|
||||
- ^.*\.md$
|
||||
- ^.*\.rst$
|
||||
- ^doc/.*$
|
||||
- ^etc/.*$
|
||||
- ^metadata.json$
|
||||
- ^releasenotes/.*$
|
||||
- ^test-requirements.txt$
|
||||
|
||||
- job:
|
||||
name: puppet-openstack-syntax-3-legacy
|
||||
@ -331,6 +349,8 @@
|
||||
parent: puppet-openstack-module-base
|
||||
run: playbooks/run-build-tests.yaml
|
||||
files: ^metadata.json$
|
||||
vars:
|
||||
use_puppetlabs: True
|
||||
|
||||
- project-template:
|
||||
name: puppet-openstack-check-jobs
|
||||
|
@ -37,4 +37,26 @@
|
||||
- libxml2-dev
|
||||
- libxslt-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
|
||||
|
@ -1,29 +1,5 @@
|
||||
- hosts: all
|
||||
tasks:
|
||||
- shell:
|
||||
cmd: |
|
||||
set -e
|
||||
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 }}'
|
||||
- shell: /opt/puppetlabs/bin/puppet module build .
|
||||
args:
|
||||
chdir: '{{ zuul.project.src_dir }}'
|
||||
|
Loading…
Reference in New Issue
Block a user