Skip to content

Commit bb17e08

Browse files
committed
Allow /vsmagent/agent_hostname to be overridden
ansible_fqdn isn't always the right choice for /vsmagent/agent_hostname. In setups with the Agent servers behind a NAT firewall, you want your agent to advertise a externally-reachable hostname rather than their internal hostname. This introduces a new thinlinc_agent_hostname variable that allows you to set agent_hostname to the address you prefer.
1 parent 6360b8c commit bb17e08

3 files changed

Lines changed: 21 additions & 1 deletion

File tree

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,17 @@ thinlinc_webadm_password: "$6$7cc31a35e02e55ec$hm.1MsloeBJqNKljx9RH88Z/eRKZCka5Z
7070
ThinLinc Web Administration password. This default password is
7171
"thinlinc". Generate new hashes with `/opt/thinlinc/sbin/tl-gen-auth`.
7272

73+
```yaml
74+
thinlinc_agent_hostname: null
75+
```
76+
77+
This allows you to modify the hostname reported by the agent server to
78+
the client on connecting. See [ThinLinc in a NAT/Split-DNS
79+
Environment](https://www.cendio.com/resources/docs/tag/network.html#network_nat)
80+
for details.
81+
82+
Setting `thinlinc_agent_hostname` to null sets this parameter to `ansible_fqdn`.
83+
7384

7485
Examples
7586
--------

defaults/main.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,12 @@ thinlinc_webadm_password: "$6$7cc31a35e02e55ec$hm.1MsloeBJqNKljx9RH88Z/eRKZCka5Z
2121
# - new: overwrite all local changes with new defaults
2222
# - parameters: auto-migrate old to new configuration
2323
thinlinc_tlsetup_migrate_conf: "old"
24+
25+
26+
# The agent hostname to report to clients. If your server is behind a
27+
# firewall with NAT, this must be set to an address that forwards to
28+
# your server. See
29+
# https://www.cendio.com/resources/docs/tag/network.html#network_nat
30+
#
31+
# The default value is null, which is equal to ansible_fqdn.
32+
thinlinc_agent_hostname: null

tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
- name: Configure /vsmagent/agent_hostname
4444
tlconfig:
4545
param: /vsmagent/agent_hostname
46-
value: "{{ ansible_fqdn }}"
46+
value: "{{ thinlinc_agent_hostname or ansible_fqdn }}"
4747
notify: restart vsmagent
4848
when: "'thinlinc-agents' in group_names"
4949

0 commit comments

Comments
 (0)