[ci-workers] Handle user home directories outside /home
This commit is contained in:
parent
c9c2650456
commit
8bdabdb37e
|
@ -5,11 +5,11 @@ After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=forking
|
Type=forking
|
||||||
PIDFile=/home/{{ buildbot_worker_user }}/{{ buildbot_worker_name }}/twistd.pid
|
PIDFile={{ buildbot_worker_dir }}/{{ buildbot_worker_name }}/twistd.pid
|
||||||
WorkingDirectory=/home/{{ buildbot_worker_user }}
|
WorkingDirectory={{ buildbot_worker_dir }}
|
||||||
ExecStart=/home/{{ buildbot_worker_user }}/venv/bin/buildbot-worker start {{ buildbot_worker_name }}
|
ExecStart={{ buildbot_worker_dir }}/venv/bin/buildbot-worker start {{ buildbot_worker_name }}
|
||||||
ExecReload=/home/{{ buildbot_worker_user }}/venv/bin/buildbot-worker restart {{ buildbot_worker_name }}
|
ExecReload={{ buildbot_worker_dir }}/venv/bin/buildbot-worker restart {{ buildbot_worker_name }}
|
||||||
ExecStop=/home/{{ buildbot_worker_user }}/venv/bin/buildbot-worker stop {{ buildbot_worker_name }}
|
ExecStop={{ buildbot_worker_dir }}/venv/bin/buildbot-worker stop {{ buildbot_worker_name }}
|
||||||
Restart=always
|
Restart=always
|
||||||
User={{ buildbot_worker_user }}
|
User={{ buildbot_worker_user }}
|
||||||
|
|
||||||
|
|
|
@ -101,6 +101,15 @@
|
||||||
shell: /bin/bash
|
shell: /bin/bash
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
|
- name: Get absolute path to Buildbot worker home directory
|
||||||
|
command: echo ~
|
||||||
|
register: homedir
|
||||||
|
become_user: "{{ buildbot_worker_user }}"
|
||||||
|
|
||||||
|
- name: Save absolute path to Buildbot worker home directory
|
||||||
|
set_fact:
|
||||||
|
buildbot_worker_dir: "{{ homedir.stdout }}"
|
||||||
|
|
||||||
- name: Install required Python modules
|
- name: Install required Python modules
|
||||||
pip:
|
pip:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
|
|
Loading…
Reference in New Issue