diff --git a/jenkins/slave/defaults/main.yml b/jenkins/slave/defaults/main.yml index 4d5bc9ac..2dc391d0 100644 --- a/jenkins/slave/defaults/main.yml +++ b/jenkins/slave/defaults/main.yml @@ -4,7 +4,7 @@ jenkins_slave: False jenkins_dest: "/var/lib/jenkins" jenkins_username: jenkins jenkins_group: jenkins -jenkins_shell: /bin/bash +jenkins_slaves_shell: /bin/bash jenkins_tmp_retain_days: 5 # TODO: fetch the public key from the master #jenkins_master_pubkey: diff --git a/jenkins/slave/tasks/main.yml b/jenkins/slave/tasks/main.yml index 916f5b62..8895f3a5 100644 --- a/jenkins/slave/tasks/main.yml +++ b/jenkins/slave/tasks/main.yml @@ -1,17 +1,10 @@ --- - block: - name: add the user that will run the jenkins jobs - user: name={{ jenkins_username }} home={{ jenkins_dest }} shell={{ jenkins_shell }} generate_ssh_key=yes - - - name: ensure the jenkins master has ssh access on each slave, as jenkins user - authorized_key: user={{ jenkins_username }} key="{{ item }}" state=present - with_items: - - '{{ jenkins_master_pubkey }}' + user: name={{ jenkins_username }} home={{ jenkins_dest }} shell={{ jenkins_slaves_shell }} generate_ssh_key=yes - name: Daily cron job to cleanup the /tmp junk - template: src={{ item }}.j2 dest=/etc/cron.daily/{{ item }} owner=root group=root mode=0755 - with_items: - - tmp-cleaner + template: src=tmp-cleaner.j2 dest=/etc/cron.daily/{{ item }} owner=root group=root mode=0755 when: jenkins_slave tags: [ 'jenkins', 'jenkins_slave' ]