From: Alfredo Deza Date: Thu, 5 Nov 2015 20:44:16 +0000 (-0500) Subject: ensure that rpmmacros is set when building centos slaves X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=35010ff1cf42c3261aa4f94e91e0a60b4a768d0c;p=ceph-build.git ensure that rpmmacros is set when building centos slaves Signed-off-by: Alfredo Deza --- diff --git a/ansible/slave.yml b/ansible/slave.yml index 95d9081c..3016dd76 100644 --- a/ansible/slave.yml +++ b/ansible/slave.yml @@ -7,10 +7,10 @@ - jenkins_user: 'jenkins-build' tasks: - name: create a jenkins-build user - user: name=jenkins-build comment="Jenkins Build Slave User" + user: name=jenkins-build comment="Jenkins Build Slave User" home="/home/{{ jenkins_user }}" - name: Create .ssh directory - file: path=/home/jenkins-build/.ssh + file: path=/home/{{ jenkins_user }}/.ssh state=directory - name: set the authorized keys @@ -39,6 +39,13 @@ #- rpm-sign when: ansible_pkg_mgr == "yum" + - name: ensure the rpmmacros file exists to fix centos builds + template: + src: files/rpmmacros.j2 + dest: "/home/{{ jenkins_user }}/.rpmmacros" + owner: "{{ jenkins_user }}" + 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" @@ -78,10 +85,11 @@ - name: add docs.ceph.com host key sudo: true - known_hosts: path='/etc/ssh/ssh_known_hosts' - name='docs.ceph.com' - # docs.ceph.com.pub is the output of `ssh-keyscan docs.ceph.com` - key="{{ lookup('file', 'ssh/hostkeys/docs.ceph.com.pub') }}" + known_hosts: + path: '/etc/ssh/ssh_known_hosts' + name: 'docs.ceph.com' + # docs.ceph.com.pub is the output of `ssh-keyscan docs.ceph.com` + key: "{{ lookup('file', 'ssh/hostkeys/docs.ceph.com.pub') }}" - name: register the new slave to jenkins master jenkins-node: