From: Alfredo Deza Date: Thu, 9 Jul 2015 13:06:45 +0000 (-0400) Subject: create the jenkins-build user X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6a98857df401d74da42010c31b15f595dff96e0c;p=ceph-build.git create the jenkins-build user Signed-off-by: Alfredo Deza --- diff --git a/ansible/master/ansible-jenkins/tasks/config.yml b/ansible/master/ansible-jenkins/tasks/config.yml index 802ad374..f32c8819 100644 --- a/ansible/master/ansible-jenkins/tasks/config.yml +++ b/ansible/master/ansible-jenkins/tasks/config.yml @@ -53,7 +53,7 @@ mode: 0644 - name: Tell SELinux that we should allow Nginx to talk to Jenkins - shell: setsebool -P httpd_can_network_connect 1 + seboolean: name=httpd_can_network_connect state=yes persistent=yes - name: copy JJB config file to {{ jenkins_jobs }} synchronize: @@ -111,3 +111,19 @@ notify: - 'restart jenkins' +- name: create a jenkins-build user + user: + name: jenkins-build + comment: "Jenkins Build Slave User" + +- name: Create .ssh directory + file: + path: /home/jenkins-build/.ssh + state: directory + +- name: set the authorized keys '{{ playbook_dir }}/ansible-jenkins/files/ssh/keys/jenkins_build.pub' + authorized_key: + user: jenkins-build + key: "{{ lookup('file', 'ssh/keys/jenkins_build.pub') }}" + tags: fix +