- hosts: all
sudo: true
+ user: ubuntu
vars:
- jenkins_user: 'jenkins-build'
tasks:
- name: ensure public key is present
copy: src=files/ssh/keys/jenkins_build.pub dest=/home/{{ jenkins_user }}/.ssh/id_rsa.pub mode=0600
+ - name: /etc/jenkins_jobs should exist as a dir
+ file:
+ path: /etc/jenkins_jobs
+ state: directory
+
+ - name: jenkins api key should be present
+ copy: src=files/jenkins_jobs.ini dest=/etc/jenkins_jobs/jenkins_jobs.ini
+
# FIXME: this needs line_in_file with validation, that has:
# jenkins-build ALL=(ALL:ALL) NOPASSWD:ALL
# Copy a new "sudoers" file into place, after passing validation with visudo
- name: copy the gnupg files to build/
synchronize: src=files/gnupg.ceph-release dest=/home/{{ jenkins_user }}/build/gnupg.ceph-release
+ ignore_errors: true
- name: Install RPM requirements
sudo: yes
with_items:
- createrepo
- epel-release
+ - java-1.7.0-openjdk
+ - git
#- rpm-sign
when: ansible_pkg_mgr == "yum"
+ # Run the equivalent of "apt-get update" as a separate step
+ - apt: update_cache=yes
+ when: ansible_pkg_mgr == "apt"
+
- name: Install DEB requirements
sudo: yes
apt: name={{ item }} state=present
with_items:
+ - git
- fakeroot
- fakeroot-ng
- debhelper
- devscripts
- pbuilder
- pkg-config
+ - openjdk-7-jre
+ - python-dev
+ - python-pip
+ - python-virtualenv
when: ansible_pkg_mgr == "apt"