From: Alfredo Deza Date: Tue, 7 Jul 2015 19:16:45 +0000 (-0400) Subject: install jdk and git in slaves X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=985a0f93035be40bd5405a03c34df0f66361a1f8;p=ceph-build.git install jdk and git in slaves Signed-off-by: Alfredo Deza --- diff --git a/ansible/slaves/slave.yml b/ansible/slaves/slave.yml index 1b1834590..70954a77d 100644 --- a/ansible/slaves/slave.yml +++ b/ansible/slaves/slave.yml @@ -2,6 +2,7 @@ - hosts: all sudo: true + user: ubuntu vars: - jenkins_user: 'jenkins-build' tasks: @@ -23,6 +24,14 @@ - 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 @@ -33,6 +42,7 @@ - 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 @@ -40,13 +50,20 @@ 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 @@ -55,4 +72,8 @@ - devscripts - pbuilder - pkg-config + - openjdk-7-jre + - python-dev + - python-pip + - python-virtualenv when: ansible_pkg_mgr == "apt"