Skip to content

Commit c49b2d9

Browse files
committed
2 parents b60f97d + 3e5e56a commit c49b2d9

8 files changed

Lines changed: 67 additions & 52 deletions

tasks/install-thinlinc-debian.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
---
2-
# Because of circular dependencies, we need to install all packages at
3-
# once. I can't get the apt provider to install multiple local
4-
# packages all at once though. :/
5-
#
6-
# apt: deb="{{ item }}" state=present
7-
# with_items: "{{ thinlinc_packages }}"
2+
# The apt provider actually calls dpkg for local packages, which isn't
3+
# clever enough to handle our upgrades:
4+
# https://github.com/ansible/ansible/issues/77150
85

96
- name: Install ThinLinc Software
10-
command: "/usr/bin/dpkg --install --no-debsig --force-confold {{ ' '.join(thinlinc_packages) }}"
7+
command: "/usr/bin/apt install -y -o \"Dpkg::Options::=--no-debsig\" -o \"Dpkg::Options::=--force-confold\" {{ ' '.join(thinlinc_packages) }}"
118
notify: run tl-setup

tasks/main.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,20 @@
1515
src: "{{ thinlinc_server_bundle }}"
1616
dest: /root
1717
creates: "{{ pkgdir }}"
18-
- name: Load vars for {{ ansible_facts['architecture'] }} RPMs
19-
include_vars: "packages-rpm-{{ ansible_facts['architecture'] }}.yml"
18+
- name: Checking if rpm platform
19+
set_fact:
20+
_tl_pkg_fmt: rpm
2021
when: ansible_facts['os_family'] in ["RedHat", "Suse"]
21-
- name: Load vars for {{ ansible_facts['architecture'] }} DEBs
22-
include_vars: "packages-deb-{{ ansible_facts['architecture'] }}.yml"
22+
- name: Checking if deb platform
23+
set_fact:
24+
_tl_pkg_fmt: deb
2325
when: ansible_facts['os_family'] in ["Debian", "Ubuntu", "Linuxmint"]
26+
- name: Checking which packages to install
27+
set_fact:
28+
thinlinc_packages:
29+
"{{ _thinlinc_packages[ansible_architecture][_tl_pkg_fmt] if
30+
( thinlinc_version is version('4.14.0', '>') ) else
31+
_old_thinlinc_packages[ansible_architecture][_tl_pkg_fmt] }}"
2432
- name: Run tasks for RHEL-like
2533
include_tasks: "install-thinlinc-rhel.yml"
2634
when: ansible_facts['os_family'] == "RedHat"
@@ -31,8 +39,11 @@
3139
include_tasks: "install-thinlinc-debian.yml"
3240
when: ansible_facts['os_family'] in ["Debian", "Ubuntu", "Linuxmint"]
3341
when: >
34-
ansible_facts['packages']['thinlinc-vsm'][0]['version'] is not defined or
35-
ansible_facts['packages']['thinlinc-vsm'][0]['version'] != thinlinc_version
42+
(('thinlinc-server' not in ansible_facts['packages']) or
43+
(ansible_facts['packages']['thinlinc-server'][0]['version'] != thinlinc_version))
44+
and
45+
(('thinlinc-vsm' not in ansible_facts['packages']) or
46+
(ansible_facts['packages']['thinlinc-vsm'][0]['version'] != thinlinc_version))
3647
3748
# Workaround for OpenSUSE Tumbleweed usr merge
3849
# See https://www.cendio.com/bugzilla/show_bug.cgi?id=7829

templates/thinlinc-setup.answers.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ setup-firewall=yes
66
setup-selinux=yes
77
setup-web-integration=yes
88
setup-apparmor=yes
9-
{% if ansible_facts['fqdn'] in groups['thinlinc_masters'] %}
9+
{% if ('thinlinc_masters' not in group_names) or (ansible_facts['fqdn'] in groups['thinlinc_masters']) %}
1010
server-type=master
1111
{% else %}
1212
server-type=agent

vars/main.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,47 @@
11
---
22
pkgdir: "/root/tl-{{thinlinc_version}}-server/packages"
3+
4+
_thinlinc_packages:
5+
x86_64:
6+
rpm:
7+
- "{{ pkgdir }}/thinlinc-server-{{ thinlinc_version }}-{{ thinlinc_build }}.x86_64.rpm"
8+
deb:
9+
- "{{ pkgdir }}/thinlinc-server_{{ thinlinc_version }}-{{ thinlinc_build }}_amd64.deb"
10+
11+
_old_thinlinc_packages:
12+
i386:
13+
rpm:
14+
- "{{ pkgdir }}/thinlinc-tladm-{{ thinlinc_version }}-{{ thinlinc_build }}.i686.rpm"
15+
- "{{ pkgdir }}/thinlinc-tlmisc-{{ thinlinc_version }}-{{ thinlinc_build }}.i686.rpm"
16+
- "{{ pkgdir }}/thinlinc-tlmisc-libs32-{{ thinlinc_version }}-{{ thinlinc_build }}.i686.rpm"
17+
- "{{ pkgdir }}/thinlinc-tlprinter-{{ thinlinc_version }}-{{ thinlinc_build }}.noarch.rpm"
18+
- "{{ pkgdir }}/thinlinc-webaccess-{{ thinlinc_version }}-{{ thinlinc_build }}.noarch.rpm"
19+
- "{{ pkgdir }}/thinlinc-vnc-server-{{ thinlinc_version }}-{{ thinlinc_build }}.i686.rpm"
20+
- "{{ pkgdir }}/thinlinc-vsm-{{ thinlinc_version }}-{{ thinlinc_build }}.i686.rpm"
21+
deb:
22+
- "{{ pkgdir }}/thinlinc-tladm_{{ thinlinc_version }}-{{ thinlinc_build }}_i386.deb"
23+
- "{{ pkgdir }}/thinlinc-tlmisc_{{ thinlinc_version }}-{{ thinlinc_build }}_i386.deb"
24+
- "{{ pkgdir }}/thinlinc-tlmisc-libs32_{{ thinlinc_version }}-{{ thinlinc_build }}_i386.deb"
25+
- "{{ pkgdir }}/thinlinc-tlprinter_{{ thinlinc_version }}-{{ thinlinc_build }}_all.deb"
26+
- "{{ pkgdir }}/thinlinc-webaccess_{{ thinlinc_version }}-{{ thinlinc_build }}_all.deb"
27+
- "{{ pkgdir }}/thinlinc-vnc-server_{{ thinlinc_version }}-{{ thinlinc_build }}_i386.deb"
28+
- "{{ pkgdir }}/thinlinc-vsm_{{ thinlinc_version }}-{{ thinlinc_build }}_i386.deb"
29+
x86_64:
30+
rpm:
31+
- "{{ pkgdir }}/thinlinc-tladm-{{ thinlinc_version }}-{{ thinlinc_build }}.x86_64.rpm"
32+
- "{{ pkgdir }}/thinlinc-tlmisc-{{ thinlinc_version }}-{{ thinlinc_build }}.x86_64.rpm"
33+
- "{{ pkgdir }}/thinlinc-tlmisc-libs32-{{ thinlinc_version }}-{{ thinlinc_build }}.i686.rpm"
34+
- "{{ pkgdir }}/thinlinc-tlmisc-libs-{{ thinlinc_version }}-{{ thinlinc_build }}.x86_64.rpm"
35+
- "{{ pkgdir }}/thinlinc-tlprinter-{{ thinlinc_version }}-{{ thinlinc_build }}.noarch.rpm"
36+
- "{{ pkgdir }}/thinlinc-webaccess-{{ thinlinc_version }}-{{ thinlinc_build }}.noarch.rpm"
37+
- "{{ pkgdir }}/thinlinc-vnc-server-{{ thinlinc_version }}-{{ thinlinc_build }}.x86_64.rpm"
38+
- "{{ pkgdir }}/thinlinc-vsm-{{ thinlinc_version }}-{{ thinlinc_build }}.x86_64.rpm"
39+
deb:
40+
- "{{ pkgdir }}/thinlinc-tladm_{{ thinlinc_version }}-{{ thinlinc_build }}_amd64.deb"
41+
- "{{ pkgdir }}/thinlinc-tlmisc_{{ thinlinc_version }}-{{ thinlinc_build }}_amd64.deb"
42+
- "{{ pkgdir }}/thinlinc-tlmisc-libs32_{{ thinlinc_version }}-{{ thinlinc_build }}_amd64.deb"
43+
- "{{ pkgdir }}/thinlinc-tlmisc-libs_{{ thinlinc_version }}-{{ thinlinc_build }}_amd64.deb"
44+
- "{{ pkgdir }}/thinlinc-tlprinter_{{ thinlinc_version }}-{{ thinlinc_build }}_all.deb"
45+
- "{{ pkgdir }}/thinlinc-webaccess_{{ thinlinc_version }}-{{ thinlinc_build }}_all.deb"
46+
- "{{ pkgdir }}/thinlinc-vnc-server_{{ thinlinc_version }}-{{ thinlinc_build }}_amd64.deb"
47+
- "{{ pkgdir }}/thinlinc-vsm_{{ thinlinc_version }}-{{ thinlinc_build }}_amd64.deb"

vars/packages-deb-i386.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

vars/packages-deb-x86_64.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

vars/packages-rpm-i386.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

vars/packages-rpm-x86_64.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)