diff options
Diffstat (limited to 'roles/streaming/blackmagic/desktopvideo')
-rw-r--r-- | roles/streaming/blackmagic/desktopvideo/tasks/main.yml | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/roles/streaming/blackmagic/desktopvideo/tasks/main.yml b/roles/streaming/blackmagic/desktopvideo/tasks/main.yml index 3ef7231e..98d2d28b 100644 --- a/roles/streaming/blackmagic/desktopvideo/tasks/main.yml +++ b/roles/streaming/blackmagic/desktopvideo/tasks/main.yml @@ -13,21 +13,38 @@ set_fact: blackmagic_desktopvideo_packages: "{{ ['desktopvideo'] | union(blackmagic_desktopvideo_include_gui | ternary(['desktopvideo-gui'], [])) }}" +- name: generate apt pin files for desktopvideo packages + when: blackmagic_desktopvideo_version is defined + loop: "{{ blackmagic_desktopvideo_packages }}" + copy: + dest: "/etc/apt/preferences.d/{{ item }}.pref" + content: | + Package: {{ item }} + Pin: version {{ blackmagic_desktopvideo_version }} + Pin-Priority: 1001 + +- name: remove apt pin files for desktopvideo packages + when: blackmagic_desktopvideo_version is not defined + loop: "{{ blackmagic_desktopvideo_packages }}" + file: + path: "/etc/apt/preferences.d/{{ item }}.pref" + state: absent + - 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 - ## TODO: remove force once the following changes are available - ## https://github.com/ansible/ansible/pull/73629 or https://github.com/ansible/ansible/pull/72562 + # allow_downgrade: yes + ## TODO: replace force with allow_downgrade once the following change is available (ansible >= 5.0) ## https://github.com/ansible/ansible/pull/74852 -- name: disable automatic upgrades for desktopvideo packages - when: blackmagic_desktopvideo_version is defined + ## TODO: remove this when all machines are migrated to use pin files +- name: unhold packages (we now use APT pinning) loop: "{{ blackmagic_desktopvideo_packages }}" dpkg_selections: name: "{{ item }}" - selection: hold + selection: install - name: install improved kill mode for DesktopVideoHelper (1/2) file: |