ci-workers: Enable pipelining, and use root to set admin and host details

Workarounds for Ansible issues when becoming an unprivileged user:
https://docs.ansible.com/ansible/become.html#becoming-an-unprivileged-user
This commit is contained in:
Jack Grigg 2017-08-01 12:35:58 +01:00
parent 10acd8a1fb
commit 8ebb299d40
No known key found for this signature in database
GPG Key ID: 665DBCD284F7DAFF
2 changed files with 10 additions and 4 deletions

View File

@ -0,0 +1,2 @@
[ssh_connection]
pipelining = True

View File

@ -99,14 +99,18 @@
- name: Set admin details for Buildbot worker
copy:
content: "{{ buildbot_worker_admin }}"
dest: "~/{{ buildbot_worker_name }}/info/admin"
become_user: "{{ buildbot_worker_user }}"
dest: "~{{ buildbot_worker_user }}/{{ buildbot_worker_name }}/info/admin"
owner: "{{ buildbot_worker_user }}"
group: "{{ buildbot_worker_user }}"
mode: "0644"
- name: Set host details for Buildbot worker
template:
src: "{{ buildbot_worker_host_template }}"
dest: "~/{{ buildbot_worker_name }}/info/host"
become_user: "{{ buildbot_worker_user }}"
dest: "~{{ buildbot_worker_user }}/{{ buildbot_worker_name }}/info/host"
owner: "{{ buildbot_worker_user }}"
group: "{{ buildbot_worker_user }}"
mode: "0644"
- name: Copy Buildbot worker systemd service unit
template: