--- - import_tasks: local_facts.yaml - name: debian package requirements for buildbot apt: pkg: - python3-pip - fish - git - python-psycopg2 # for ansible - postgresql - python3-psycopg2 - name: install buildbot pip: name: buildbot[bundle] executable: pip3 - name: install gitea integration for buildbot pip: name: buildbot_gitea 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 - name: buildbot var directory file: path: /var/lib/buildbot state: directory owner: buildbot group: buildbot mode: 0700 # 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 - import_tasks: database.yaml - name: initiate buildbot master configurations 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: reload buildbot service - meta: flush_handlers - name: ensure buildbot service is running systemd: state: started name: buildbot@master.service