You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

84 line
1.9KB

  1. ---
  2. - name: pip3 packages for buildbot master
  3. pip:
  4. name:
  5. - buildbot
  6. - buildbot-www
  7. - buildbot-waterfall-view
  8. - buildbot-console-view
  9. - buildbot-grid-view
  10. - buildbot-badges
  11. - buildbot_gitea
  12. - service_identity
  13. - zope.interface>=4.4.2
  14. executable: pip3
  15. - name: buildbot system group
  16. group:
  17. name: buildbot
  18. system: yes
  19. - name: buildbot system user
  20. user:
  21. name: buildbot
  22. group: buildbot
  23. system: yes
  24. home: /var/lib/buildbot
  25. shell: /usr/bin/fish
  26. generate_ssh_key: true
  27. ssh_key_type: ed25519
  28. - name: buildbot var directory
  29. file:
  30. path: /var/lib/buildbot
  31. state: directory
  32. owner: buildbot
  33. group: buildbot
  34. mode: 0700
  35. # source of unit file from https://github.com/buildbot/buildbot-contrib/blob/master/master/contrib/systemd/buildbot%40.service
  36. - name: buildbot systemd service unit
  37. copy:
  38. src: systemd/buildbot@.service
  39. dest: /etc/systemd/system/buildbot@.service
  40. notify: systemd daemon reload
  41. - name: initiate buildbot master
  42. command: buildbot create-master --db {{buildbot_database_url}} --relocatable master
  43. become: true
  44. become_user: buildbot
  45. args:
  46. chdir: /var/lib/buildbot
  47. creates: /var/lib/buildbot/master
  48. - name: buildbot master config file
  49. template:
  50. src: buildbot/master.cfg.j2
  51. dest: /var/lib/buildbot/master/master.cfg
  52. notify: restart buildbot service
  53. - meta: flush_handlers
  54. - name: ensure buildbot master service is running
  55. systemd:
  56. state: started
  57. name: buildbot@master.service
  58. - include_role:
  59. name: certificate
  60. vars:
  61. certificate_name: buildbot
  62. certificate_directory: /etc/ssl
  63. certificate_key_usage:
  64. - digitalSignature
  65. - keyEncipherment
  66. certificate_extended_key_usage:
  67. - serverAuth
  68. certificate_common_name: "{{ buildbot_server_name }}"
  69. - include_role:
  70. name: nginx
  71. vars:
  72. nginx_vhosts: "{{ buildbot_nginx_vhosts }}"