25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.6KB

  1. ---
  2. - name: initiate buildbot-worker
  3. command: buildbot-worker create-worker buildbot-worker localhost:9989 "{{buildbot_worker_name}}" "{{buildbot_worker_password}}"
  4. become: true
  5. become_user: "{{buildbot_worker_user}}"
  6. args:
  7. chdir: "{{buildbot_worker_home_directory}}"
  8. creates: /var/lib/buildbot-worker/{{buildbot_worker_name}}/worker
  9. notify: restart buildbot-worker service
  10. - name: buildbot-worker name
  11. lineinfile:
  12. path: /var/lib/buildbot-worker/{{buildbot_worker_name}}/worker/buildbot.tac
  13. regexp: '^workername *='
  14. line: workername = '{{buildbot_worker_name}}'
  15. notify: restart buildbot-worker service
  16. - name: buildbot-worker password
  17. lineinfile:
  18. path: /var/lib/buildbot-worker/{{buildbot_worker_name}}/worker/buildbot.tac
  19. regexp: '^passwd *='
  20. line: passwd = '{{buildbot_worker_password}}'
  21. notify: restart buildbot-worker service
  22. - name: buildbot-worker host info
  23. copy:
  24. content: "{{buildbot_worker_host_info}}"
  25. dest: /var/lib/buildbot-worker/{{buildbot_worker_name}}/worker/info/host
  26. owner: "{{ buildbot_worker_user }}"
  27. group: "{{ buildbot_worker_group }}"
  28. notify: restart buildbot-worker service
  29. - name: buildbot-worker admin info
  30. copy:
  31. content: "{{buildbot_worker_admin_info}}"
  32. dest: /var/lib/buildbot-worker/{{buildbot_worker_name}}/worker/info/admin
  33. owner: "{{ buildbot_worker_user }}"
  34. group: "{{ buildbot_worker_group }}"
  35. notify: restart buildbot-worker service
  36. - meta: flush_handlers
  37. - name: ensure buildbot-worker service is running
  38. systemd:
  39. state: started
  40. name: buildbot-worker@{{buildbot_worker_name}}.service