]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
install jdk and git in slaves
authorAlfredo Deza <adeza@redhat.com>
Tue, 7 Jul 2015 19:16:45 +0000 (15:16 -0400)
committerAlfredo Deza <adeza@redhat.com>
Fri, 17 Jul 2015 21:23:26 +0000 (17:23 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
ansible/slaves/slave.yml

index 1b183459057582578eabd2e0e479e3491ff81e26..70954a77daf79a0d46ff87b4409fa94ad1243269 100644 (file)
@@ -2,6 +2,7 @@
 
 - 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
@@ -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
       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"