make sure that the buildmaster's pubkey is known to taskotron clients

This commit is contained in:
Tim Flink 2014-07-03 22:33:46 +00:00
parent ba09165152
commit c7cc1b0ef2
2 changed files with 7 additions and 0 deletions

View file

@ -25,6 +25,12 @@
- name: install slave ssh public key
copy: src={{ private }}/files/taskotron/{{ buildslave_public_sshkey_file }} dest={{ slave_home }}/.ssh/id_rsa.pub owner={{ slave_user }} group={{ slave_user }} mode=0644
- name: ensure slave's known_hosts file exists
file: path=/home/{{ slave_user }}/.ssh/known_hosts owner={{ slave_user }} group={{ slave_user }} mode=0644 state=touch
- name: make sure master is in known_hosts
lineinfile: dest=/home/{{ slave_user }}/.ssh/known_hosts regexp='{{ buildmaster }}' line='{{ buildmaster }} {{ buildmaster_pubkey }}'
- name: generate buildslave service file
template: src=buildslave.service.j2 dest=/lib/systemd/system/buildslave.service owner=root group=root mode=0744