summaryrefslogtreecommitdiff
path: root/roles/streaming/blackmagic/desktopvideo/tasks/main.yml
blob: 980e10e1700e6051d4c1de28306abd3a2c0f8f08 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
---
- name: install blackmagic repo
  import_role:
    name: apt-repo/blackmagic

- name: install xauth package for SSH X-Forwarding to work
  when: blackmagic_desktopvideo_include_gui
  apt:
    name: xauth
    state: present

- name: generate list of desktopvideo packages
  set_fact:
    blackmagic_desktopvideo_packages: "{{ ['desktopvideo'] | union(blackmagic_desktopvideo_include_gui | ternary(['desktopvideo-gui'], [])) }}"

- name: install blackmagic desktopvideo packages
  apt:
    name: "{{ blackmagic_desktopvideo_packages | product(blackmagic_desktopvideo_version is defined | ternary(['=' + (blackmagic_desktopvideo_version | default(''))], [''])) | map('join') }}"
    state: present
    force: yes

- name: disable automatic upgrades for desktopvideo packages
  when: blackmagic_desktopvideo_version is defined
  loop: "{{ blackmagic_desktopvideo_packages }}"
  dpkg_selections:
    name: "{{ item }}"
    selection: hold

- name: install improved kill mode for DesktopVideoHelper (1/2)
  file:
    name: /etc/systemd/system/DesktopVideoHelper.service.d
    state: directory

- name: install improved kill mode for DesktopVideoHelper (1/2)
  copy:
    src: DesktopVideoHelper-killmode.conf
    dest: /etc/systemd/system/DesktopVideoHelper.service.d/killmode.conf
  notify: reload systemd

- name: make sure DesktopVideoHelper is enabled and started
  systemd:
    name: DesktopVideoHelper.service
    daemon_reload: yes
    state: started
    enabled: yes