Procházet zdrojové kódy

move all master configuration in master.yaml tasks file

covid-videoplattform
rodič
revize
fcfc3c575b
2 změnil soubory, kde provedl 70 přidání a 67 odebrání
  1. +1
    -67
      tasks/main.yaml
  2. +69
    -0
      tasks/master.yaml

+ 1
- 67
tasks/main.yaml Zobrazit soubor

@@ -36,72 +36,6 @@
name: service_identity
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

# 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: restart buildbot service

- meta: flush_handlers

- name: ensure buildbot 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 }}"
- import_tasks: master.yaml

+ 69
- 0
tasks/master.yaml Zobrazit soubor

@@ -0,0 +1,69 @@
---

- 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

# 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 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: 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 }}"

Načítá se…
Zrušit
Uložit