|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- ---
-
- - 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
- 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
-
- - include_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 }}"
-
- - include_role:
- name: nginx
- vars:
- nginx_vhosts: "{{ buildbot_nginx_vhosts }}"
-
- - meta: flush_handlers
|