Browse Source

no user configuration here

master
parent
commit
ffdcf54fef
4 changed files with 3 additions and 40 deletions
  1. +2
    -2
      files/systemd/buildbot-worker@.service
  2. +1
    -30
      tasks/buildbot-worker.yaml
  3. +0
    -5
      tasks/setup.yaml
  4. +0
    -3
      vars/main.yaml

+ 2
- 2
files/systemd/buildbot-worker@.service View File

@@ -11,8 +11,8 @@ After=network.target
[Service] [Service]
User=%i User=%i
Group=%i Group=%i
WorkingDirectory=/var/lib/buildbot-worker/%i
ExecStart=/usr/local/bin/buildbot-worker start --nodaemon worker
WorkingDirectory=~
ExecStart=/usr/local/bin/buildbot-worker start --nodaemon buildbot-worker
# if using EC2 Latent worker, you want to uncomment following line, and comment out the Restart line # if using EC2 Latent worker, you want to uncomment following line, and comment out the Restart line
# ExecStopPost=shutdown now # ExecStopPost=shutdown now
Restart=always Restart=always


+ 1
- 30
tasks/buildbot-worker.yaml View File

@@ -1,36 +1,7 @@
--- ---


- name: buildbot-worker group
group:
name: "{{ buildbot_worker_group }}"

- name: buildbot-worker user
user:
name: "{{ buildbot_worker_user }}"
group: "{{ buildbot_worker_group }}"
home: "{{ buildbot_worker_home_directory }}"
shell: /usr/bin/fish
password_lock: true

- name: buildbot-worker home directory
file:
path: "{{ buildbot_worker_home_directory }}"
owner: "{{ buildbot_worker_user }}"
group: "{{ buildbot_worker_group }}"
state: directory
mode: u=rwx,g=rx,o=

# source of unit file from https://github.com/buildbot/buildbot-contrib/blob/master/worker/contrib/systemd/buildbot-worker%40.service
- name: buildbot-worker systemd service unit
copy:
src: systemd/buildbot-worker@.service
dest: /etc/systemd/system/buildbot-worker@.service
notify:
- systemd daemon reload
- restart buildbot-worker service

- name: initiate buildbot-worker - name: initiate buildbot-worker
command: buildbot-worker create-worker worker localhost:9989 "{{buildbot_worker_name}}" "{{buildbot_worker_password}}"
command: buildbot-worker create-worker buildbot-worker localhost:9989 "{{buildbot_worker_name}}" "{{buildbot_worker_password}}"
become: true become: true
become_user: "{{buildbot_worker_user}}" become_user: "{{buildbot_worker_user}}"
args: args:


+ 0
- 5
tasks/setup.yaml View File

@@ -5,8 +5,3 @@
name: name:
- buildbot-worker - buildbot-worker
executable: pip3 executable: pip3

- name: buildbot-worker var directory
file:
path: /var/lib/buildbot-worker
state: directory

+ 0
- 3
vars/main.yaml View File

@@ -1,4 +1 @@
--- ---
buildbot_worker_user: "{{ buildbot_worker_name }}"
buildbot_worker_group: "{{ buildbot_worker_name }}"
buildbot_worker_home_directory: "/var/lib/buildbot-worker/{{ buildbot_worker_name }}"

Loading…
Cancel
Save