Browse Source

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
pull/128/head
Jack Grigg 7 years ago
parent
commit
8ebb299d40
No known key found for this signature in database GPG Key ID: 665DBCD284F7DAFF
  1. 2
      contrib/ci-workers/ansible.cfg
  2. 12
      contrib/ci-workers/unix.yml

2
contrib/ci-workers/ansible.cfg

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

12
contrib/ci-workers/unix.yml

@ -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:

Loading…
Cancel
Save