Fix functional testing for Ubuntu

Change-Id: Ic02a84f7f44f0589ac7b53bd1aa73fc1400c27f0
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2016-02-09 19:10:36 -05:00
parent af22492259
commit e7869b9e49
5 changed files with 33 additions and 19 deletions

View File

@ -21,8 +21,9 @@
with_items:
- "{{ jenkins_user_home }}/plugins"
- name: Template clouds yaml file.
- name: Template jenkins service config.
template:
dest: "{{ jenkins_template_config_dest }}"
src: "{{ jenkins_template_config_src }}"
when: ansible_os_family == 'RedHat'
notify: Restart jenkins

View File

@ -17,5 +17,13 @@
jenkins_build_depends: "{{ __jenkins_build_depends | list }}"
when: jenkins_build_depends is not defined
- include: install/redhat.yaml
when: ansible_os_family == 'RedHat'
- name: Ensure build dependencies are installed.
package:
name: "{{ item }}"
state: installed
with_items: jenkins_build_depends
- name: Ensure jenkins is installed.
package:
name: jenkins
state: installed

View File

@ -0,0 +1 @@
deb http://pkg.jenkins-ci.org/debian binary/

View File

@ -18,12 +18,6 @@
rolename: "{{ lookup('pipe', 'pwd') | dirname | basename }}"
pre_tasks:
# Make sure OS does not have a stale package cache.
- name: Update apt cache.
apt:
update_cache: yes
when: ansible_os_family == 'Debian'
- name: Configure yum for Jenkins repository.
become: yes
copy:
@ -31,6 +25,13 @@
dest: /etc/yum.repos.d
when: ansible_os_family == 'RedHat'
- name: Configure apt for Jenkins repository.
become: yes
copy:
src: jenkins/etc/apt/sources.list.d/jenkins.list
dest: /etc/apt/sources.list.d
when: ansible_os_family == 'Debian'
- name: Configure gpg key for Jenkins repository.
become: yes
copy:
@ -44,5 +45,16 @@
key: /etc/pki/rpm-gpg/jenkins-ci.org.key
when: ansible_os_family == 'RedHat'
- name: Import GPG key for Jenkins repo.
become: yes
apt_key:
data: "{{ lookup('file', 'jenkins/jenkins-ci.org.key') }}"
when: ansible_os_family == 'Debian'
- name: Update apt cache.
apt:
update_cache: yes
when: ansible_os_family == 'Debian'
roles:
- "{{ rolename }}"

View File

@ -12,13 +12,5 @@
# License for the specific language governing permissions and limitations
# under the License.
---
- name: Ensure build dependencies are installed.
yum:
pkg: "{{ item }}"
state: installed
with_items: jenkins_build_depends
- name: Ensure jenkins is installed.
yum:
pkg: jenkins
state: installed
__jenkins_build_depends:
- openjdk-7-jdk