This repository was archived by the owner on Nov 22, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy paththinlinc-install.yml
More file actions
106 lines (89 loc) · 5.25 KB
/
thinlinc-install.yml
File metadata and controls
106 lines (89 loc) · 5.25 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
---
- hosts: thinlinc
vars:
pkgdir: "/root/tl-{{thinlinc_version}}-server/packages"
rpm64files:
- "{{ pkgdir }}/thinlinc-rdesktop-{{ thinlinc_version }}-{{ thinlinc_build }}.x86_64.rpm"
- "{{ pkgdir }}/thinlinc-tladm-{{ thinlinc_version }}-{{ thinlinc_build }}.x86_64.rpm"
- "{{ pkgdir }}/thinlinc-tlmisc-{{ thinlinc_version }}-{{ thinlinc_build }}.x86_64.rpm"
- "{{ pkgdir }}/thinlinc-tlmisc-libs32-{{ thinlinc_version }}-{{ thinlinc_build }}.i686.rpm"
- "{{ pkgdir }}/thinlinc-tlmisc-libs-{{ thinlinc_version }}-{{ thinlinc_build }}.x86_64.rpm"
- "{{ pkgdir }}/thinlinc-tlprinter-{{ thinlinc_version }}-{{ thinlinc_build }}.noarch.rpm"
- "{{ pkgdir }}/thinlinc-webaccess-{{ thinlinc_version }}-{{ thinlinc_build }}.noarch.rpm"
- "{{ pkgdir }}/thinlinc-vnc-server-{{ thinlinc_version }}-{{ thinlinc_build }}.x86_64.rpm"
- "{{ pkgdir }}/thinlinc-vsm-{{ thinlinc_version }}-{{ thinlinc_build }}.x86_64.rpm"
rpm32files:
- "{{ pkgdir }}/thinlinc-rdesktop-{{ thinlinc_version }}-{{ thinlinc_build }}.i686.rpm"
- "{{ pkgdir }}/thinlinc-tladm-{{ thinlinc_version }}-{{ thinlinc_build }}.i686.rpm"
- "{{ pkgdir }}/thinlinc-tlmisc-{{ thinlinc_version }}-{{ thinlinc_build }}.i686.rpm"
- "{{ pkgdir }}/thinlinc-tlmisc-libs32-{{ thinlinc_version }}-{{ thinlinc_build }}.i686.rpm"
- "{{ pkgdir }}/thinlinc-tlprinter-{{ thinlinc_version }}-{{ thinlinc_build }}.noarch.rpm"
- "{{ pkgdir }}/thinlinc-webaccess-{{ thinlinc_version }}-{{ thinlinc_build }}.noarch.rpm"
- "{{ pkgdir }}/thinlinc-vnc-server-{{ thinlinc_version }}-{{ thinlinc_build }}.i686.rpm"
- "{{ pkgdir }}/thinlinc-vsm-{{ thinlinc_version }}-{{ thinlinc_build }}.i686.rpm"
deb64files:
- "{{ pkgdir }}/thinlinc-rdesktop_{{ thinlinc_version }}-{{ thinlinc_build }}_amd64.deb"
- "{{ pkgdir }}/thinlinc-tladm_{{ thinlinc_version }}-{{ thinlinc_build }}_amd64.deb"
- "{{ pkgdir }}/thinlinc-tlmisc_{{ thinlinc_version }}-{{ thinlinc_build }}_amd64.deb"
- "{{ pkgdir }}/thinlinc-tlmisc-libs32_{{ thinlinc_version }}-{{ thinlinc_build }}_amd64.deb"
- "{{ pkgdir }}/thinlinc-tlmisc-libs_{{ thinlinc_version }}-{{ thinlinc_build }}_amd64.deb"
- "{{ pkgdir }}/thinlinc-tlprinter_{{ thinlinc_version }}-{{ thinlinc_build }}_all.deb"
- "{{ pkgdir }}/thinlinc-webaccess_{{ thinlinc_version }}-{{ thinlinc_build }}_all.deb"
- "{{ pkgdir }}/thinlinc-vnc-server_{{ thinlinc_version }}-{{ thinlinc_build }}_amd64.deb"
- "{{ pkgdir }}/thinlinc-vsm_{{ thinlinc_version }}-{{ thinlinc_build }}_amd64.deb"
deb32files:
- "{{ pkgdir }}/thinlinc-rdesktop_{{ thinlinc_version }}-{{ thinlinc_build }}_i386.deb"
- "{{ pkgdir }}/thinlinc-tladm_{{ thinlinc_version }}-{{ thinlinc_build }}_i386.deb"
- "{{ pkgdir }}/thinlinc-tlmisc_{{ thinlinc_version }}-{{ thinlinc_build }}_i386.deb"
- "{{ pkgdir }}/thinlinc-tlmisc-libs32_{{ thinlinc_version }}-{{ thinlinc_build }}_i386.deb"
- "{{ pkgdir }}/thinlinc-tlprinter_{{ thinlinc_version }}-{{ thinlinc_build }}_all.deb"
- "{{ pkgdir }}/thinlinc-webaccess_{{ thinlinc_version }}-{{ thinlinc_build }}_all.deb"
- "{{ pkgdir }}/thinlinc-vnc-server_{{ thinlinc_version }}-{{ thinlinc_build }}_i386.deb"
- "{{ pkgdir }}/thinlinc-vsm_{{ thinlinc_version }}-{{ thinlinc_build }}_i386.deb"
tasks:
- name: Download and unpack server bundle
unarchive:
src: "{{ thinlinc_server_bundle }}"
dest: /root
- name: Install ThinLinc Software (yum64)
yum: name=rpm64files state=installed
when: ansible_architecture == "x86_64" and ansible_os_family == "RedHat"
- name: Install ThinLinc Software (yum32)
yum: name=rpm32files state=installed
when: ansible_architecture == "i386" and ansible_os_family == "RedHat"
- name: Install ThinLinc Software (rpm64)
command: rpm -i --replacepkgs {{ " ".join(rpm64files) }}
when: ansible_architecture == "x86_64" and ansible_os_family == "Suse"
- name: Install ThinLinc Software (rpm32)
command: rpm -i --replacepkgs {{ " ".join(rpm32files) }}
when: ansible_architecture == "i386" and ansible_os_family == "Suse"
- name: Install ThinLinc Software (deb64)
command: dpkg -i {{ " ".join(deb64files) }}
when: ansible_architecture == "x86_64" and ansible_os_family in ["Debian", "Linuxmint", "Ubuntu"]
- name: Install ThinLinc Software (deb32)
command: dpkg -i {{ " ".join(deb32files) }}
when: ansible_architecture == "i386" and ansible_os_family in ["Debian", "Linuxmint", "Ubuntu"]
- name: Copy in tlsetup.answers
template: src=files/tl-setup.answers dest=/root/tl-setup.answers
- name: Run tl-setup
command: /opt/thinlinc/sbin/tl-setup -a /root/tl-setup.answers
- hosts: thinlinc-masters
tasks:
- name: Configure list of agent servers
tlconfig:
param: /vsmserver/terminalservers
value: "{{' '.join(groups['thinlinc-agents'])}}"
- name: Restart ThinLinc Master Services
service:
name: vsmserver
state: restarted
- hosts: thinlinc-agents
tasks:
- name: Configure agent hostnames
tlconfig:
param: /vsmagent/agent_hostname
value: "{{ ansible_fqdn }}"
- name: Restart vsmagent
service:
name: vsmagent
state: restarted