|
1 | | -# - block: |
2 | | -# # install libs needed for nuget package PuppeteerSharp |
3 | | -# - name: Define core packages |
4 | | -# set_fact: |
5 | | -# core_packages: |
6 | | -# - ca-certificates |
7 | | -# - fonts-liberation |
8 | | -# - libappindicator3-1 |
9 | | -# - libatk-bridge2.0-0 |
10 | | -# - libatk1.0-0 |
11 | | -# - libcups2 |
12 | | -# - libdbus-1-3 |
13 | | -# - libdrm2 |
14 | | -# - libgbm1 |
15 | | -# - libnspr4 |
16 | | -# - libnss3 |
17 | | -# - libx11-xcb1 |
18 | | -# - libxcomposite1 |
19 | | -# - libxdamage1 |
20 | | -# - libxrandr2 |
21 | | -# - xdg-utils |
22 | | - |
23 | | -# - name: Define default platform-specific library names |
24 | | -# set_fact: |
25 | | -# glib_library: libglib2.0-0 |
26 | | -# sound_library: libasound2 |
27 | | - |
28 | | -# - name: Define new library names based on newer OS versions |
29 | | -# set_fact: |
30 | | -# glib_library: libglib2.0-0t64 |
31 | | -# sound_library: libasound2t64 |
32 | | -# when: > |
33 | | -# ansible_facts['distribution'] == "Ubuntu" and ansible_facts['distribution_version'] | float >= 24.04 |
34 | | -# or ansible_facts['distribution'] == "Debian" and ansible_facts['distribution_version'] | float >= 13 |
35 | | -# or ansible_facts['distribution'] == "Debian" and ansible_lsb.codename == "trixie" |
36 | | - |
37 | | -# - block: # only use apparmor for ubuntu 24.04ff |
38 | | -# - name: Ensure the /etc/apparmor.d directory exists |
39 | | -# file: |
40 | | -# path: /etc/apparmor.d |
41 | | -# state: directory |
42 | | -# mode: '0755' |
43 | | - |
44 | | -# - name: Create /etc/apparmor.d/chrome-dev-builds for Chrome |
45 | | -# copy: |
46 | | -# dest: /etc/apparmor.d/chrome-dev-builds |
47 | | -# content: | |
48 | | -# abi <abi/4.0>, |
49 | | -# include <tunables/global> |
50 | | - |
51 | | -# profile /usr/local/bin/**/chrome flags=(unconfined) { |
52 | | -# userns, |
53 | | - |
54 | | -# # Site-specific additions and overrides. See local/README for details. |
55 | | -# # Include the local overrides only if the file exists. |
56 | | -# # This is a common best practice to avoid parser errors. |
57 | | -# include if exists <local/chrome> |
58 | | -# } |
59 | | -# mode: '0644' |
60 | | -# notify: |
61 | | -# - Reload and Restart AppArmor |
62 | | - |
63 | | -# when: ansible_facts['distribution'] == "Ubuntu" and ansible_facts['distribution_version'] | float >= 24.04 |
64 | | - |
65 | | -# - name: Install additional libraries for old Debian 11 |
66 | | -# apt: |
67 | | -# name: |
68 | | -# - libpangocairo-1.0-0 |
69 | | -# - libpangoft2-1.0-0 |
70 | | -# state: present |
71 | | -# update_cache: yes |
72 | | -# when: ansible_facts['distribution'] == "Debian" and ansible_facts['distribution_version'] == "11" |
73 | | - |
74 | | -# - name: Combine all packages |
75 | | -# set_fact: |
76 | | -# platform_packages: "{{ core_packages + [sound_library, glib_library] }}" |
77 | | - |
78 | | -# - name: Install all combined dependencies |
79 | | -# apt: |
80 | | -# name: "{{ platform_packages }}" |
81 | | -# state: present |
82 | | -# update_cache: yes |
83 | | - |
84 | | -# become: true |
85 | | -# environment: "{{ proxy_env }}" |
| 1 | +- block: |
| 2 | +# install libs needed for nuget package PuppeteerSharp |
| 3 | + - name: Define core packages |
| 4 | + set_fact: |
| 5 | + core_packages: |
| 6 | + - ca-certificates |
| 7 | + - fonts-liberation |
| 8 | + - libappindicator3-1 |
| 9 | + - libatk-bridge2.0-0 |
| 10 | + - libatk1.0-0 |
| 11 | + - libcups2 |
| 12 | + - libdbus-1-3 |
| 13 | + - libdrm2 |
| 14 | + - libgbm1 |
| 15 | + - libnspr4 |
| 16 | + - libnss3 |
| 17 | + - libx11-xcb1 |
| 18 | + - libxcomposite1 |
| 19 | + - libxdamage1 |
| 20 | + - libxrandr2 |
| 21 | + - xdg-utils |
| 22 | + |
| 23 | + - name: Define default platform-specific library names |
| 24 | + set_fact: |
| 25 | + glib_library: libglib2.0-0 |
| 26 | + sound_library: libasound2 |
| 27 | + |
| 28 | + - name: Define new library names based on newer OS versions |
| 29 | + set_fact: |
| 30 | + glib_library: libglib2.0-0t64 |
| 31 | + sound_library: libasound2t64 |
| 32 | + when: > |
| 33 | + ansible_facts['distribution'] == "Ubuntu" and ansible_facts['distribution_version'] | float >= 24.04 |
| 34 | + or ansible_facts['distribution'] == "Debian" and ansible_facts['distribution_version'] | float >= 13 |
| 35 | + or ansible_facts['distribution'] == "Debian" and ansible_lsb.codename == "trixie" |
| 36 | +
|
| 37 | + - block: # only use apparmor for ubuntu 24.04ff |
| 38 | + - name: Ensure the /etc/apparmor.d directory exists |
| 39 | + file: |
| 40 | + path: /etc/apparmor.d |
| 41 | + state: directory |
| 42 | + mode: '0755' |
| 43 | + |
| 44 | + - name: Create /etc/apparmor.d/chrome |
| 45 | + copy: |
| 46 | + dest: /etc/apparmor.d/chrome |
| 47 | + content: | |
| 48 | + abi <abi/4.0>, |
| 49 | + include <tunables/global> |
| 50 | +
|
| 51 | + profile /usr/local/bin/**/chrome flags=(unconfined) { |
| 52 | + userns, |
| 53 | +
|
| 54 | + # Site-specific additions and overrides. See local/README for details. |
| 55 | + # Include the local overrides only if the file exists. |
| 56 | + # This is a common best practice to avoid parser errors. |
| 57 | + include if exists <local/chrome> |
| 58 | + } |
| 59 | + mode: '0644' |
| 60 | + notify: |
| 61 | + - Reload and Restart AppArmor |
| 62 | + |
| 63 | + when: ansible_facts['distribution'] == "Ubuntu" and ansible_facts['distribution_version'] | float >= 24.04 |
| 64 | + |
| 65 | + - name: Install additional libraries for old Debian 11 |
| 66 | + apt: |
| 67 | + name: |
| 68 | + - libpangocairo-1.0-0 |
| 69 | + - libpangoft2-1.0-0 |
| 70 | + state: present |
| 71 | + update_cache: yes |
| 72 | + when: ansible_facts['distribution'] == "Debian" and ansible_facts['distribution_version'] == "11" |
| 73 | + |
| 74 | + - name: Combine all packages |
| 75 | + set_fact: |
| 76 | + platform_packages: "{{ core_packages + [sound_library, glib_library] }}" |
| 77 | + |
| 78 | + - name: Install all combined dependencies |
| 79 | + apt: |
| 80 | + name: "{{ platform_packages }}" |
| 81 | + state: present |
| 82 | + update_cache: yes |
| 83 | + |
| 84 | + become: true |
| 85 | + environment: "{{ proxy_env }}" |
86 | 86 |
|
87 | 87 | # get google chrome for pdf generation |
88 | 88 | - name: get last known good versions of chrome to download |
|
0 commit comments