|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- ---
-
- - name: pip3 packages for buildbot master
- pip:
- name:
- - buildbot
- - buildbot-www
- - buildbot-waterfall-view
- - buildbot-console-view
- - buildbot-grid-view
- - buildbot-badges
- - buildbot_gitea
- - service_identity
- - zope.interface>=4.4.2
- - cryptography>=2.7
- executable: pip3
-
- - name: buildbot system group
- group:
- name: buildbot
- system: yes
-
- - name: buildbot system user
- user:
- name: buildbot
- group: buildbot
- system: yes
- home: /var/lib/buildbot
- shell: /usr/bin/fish
- generate_ssh_key: true
- ssh_key_type: ed25519
-
- - name: buildbot var directory
- file:
- path: /var/lib/buildbot
- state: directory
- owner: buildbot
- group: buildbot
- mode: 0700
-
- - name: buildbot run directory
- file:
- path: /run/buildbot
- state: directory
- owner: buildbot
- group: www-data
- mode: u=rwx,g=rx,o=
-
- # source of unit file from https://github.com/buildbot/buildbot-contrib/blob/master/master/contrib/systemd/buildbot%40.service
- - name: buildbot systemd service unit
- copy:
- src: systemd/buildbot@.service
- dest: /etc/systemd/system/buildbot@.service
- notify: systemd daemon reload
-
- - name: initiate buildbot master
- command: buildbot create-master --db {{buildbot_database_url}} --relocatable master
- become: true
- become_user: buildbot
- args:
- chdir: /var/lib/buildbot
- creates: /var/lib/buildbot/master
-
- - name: buildbot master config file
- template:
- src: buildbot/master.cfg.j2
- dest: /var/lib/buildbot/master/master.cfg
- notify: restart buildbot service
-
- - meta: flush_handlers
-
- - name: ensure buildbot master service is running
- systemd:
- state: started
- name: buildbot@master.service
-
- - import_role:
- name: certificate
- vars:
- certificate_name: buildbot
- certificate_directory: /etc/ssl
- certificate_key_usage:
- - digitalSignature
- - keyEncipherment
- certificate_extended_key_usage:
- - serverAuth
- certificate_common_name: "{{ buildbot_server_name }}"
-
- - import_role:
- name: nginx
- vars:
- nginx_vhosts: "{{ buildbot_nginx_vhosts }}"
-
- - meta: flush_handlers
|