Remove the task that installed the master ssh key reading a local file.
This commit is contained in:
parent
7e2c847a8d
commit
2033f01ee5
|
@ -4,7 +4,7 @@ jenkins_slave: False
|
||||||
jenkins_dest: "/var/lib/jenkins"
|
jenkins_dest: "/var/lib/jenkins"
|
||||||
jenkins_username: jenkins
|
jenkins_username: jenkins
|
||||||
jenkins_group: jenkins
|
jenkins_group: jenkins
|
||||||
jenkins_shell: /bin/bash
|
jenkins_slaves_shell: /bin/bash
|
||||||
jenkins_tmp_retain_days: 5
|
jenkins_tmp_retain_days: 5
|
||||||
# TODO: fetch the public key from the master
|
# TODO: fetch the public key from the master
|
||||||
#jenkins_master_pubkey:
|
#jenkins_master_pubkey:
|
||||||
|
|
|
@ -1,17 +1,10 @@
|
||||||
---
|
---
|
||||||
- block:
|
- block:
|
||||||
- name: add the user that will run the jenkins jobs
|
- name: add the user that will run the jenkins jobs
|
||||||
user: name={{ jenkins_username }} home={{ jenkins_dest }} shell={{ jenkins_shell }} generate_ssh_key=yes
|
user: name={{ jenkins_username }} home={{ jenkins_dest }} shell={{ jenkins_slaves_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 }}'
|
|
||||||
|
|
||||||
- name: Daily cron job to cleanup the /tmp junk
|
- name: Daily cron job to cleanup the /tmp junk
|
||||||
template: src={{ item }}.j2 dest=/etc/cron.daily/{{ item }} owner=root group=root mode=0755
|
template: src=tmp-cleaner.j2 dest=/etc/cron.daily/{{ item }} owner=root group=root mode=0755
|
||||||
with_items:
|
|
||||||
- tmp-cleaner
|
|
||||||
|
|
||||||
when: jenkins_slave
|
when: jenkins_slave
|
||||||
tags: [ 'jenkins', 'jenkins_slave' ]
|
tags: [ 'jenkins', 'jenkins_slave' ]
|
||||||
|
|
Loading…
Reference in New Issue