Getting started

Example inventory

To setup and manage the X2Go server, add the hosts to the debops_service_x2go_server Ansible inventory host group:


If you are using debops.sshd for configuring your OpenSSH server, you will need to adopt some of the defaults of this role to allow X2Go clients to connect to the X2Go server via SSH. The recommended way to do those adoptions is to symlink the docs/inventory/debops_service_x2go_server_global_role_vars file shipped with this role into your inventory under ansible/inventory/group_vars/debops_service_x2go_server_global_role_vars and include all hosts from the debops_service_x2go_server in the debops_service_x2go_server_global_role_vars host group by adding this:


into your host inventory which makes the following adjustments to the defaults variables of other roles:

# .. vim: foldmarker=[[[,]]]:foldmethod=marker

# Required configuration for debops.sshd [[[

# Require the following cryptography methods as X2Go seems to only support a
# subset of which OpenSSH does support.
sshd__ciphers_additional: '{{ [ "aes256-ctr" ] if (x2go_server__deploy_state|d("present") == "present") else [] }}'
sshd__kex_algorithms_additional: '{{ [ "" ] if (x2go_server__deploy_state|d("present") == "present") else [] }}'
sshd__macs_additional: '{{ [ "hmac-sha1" ] if (x2go_server__deploy_state|d("present") == "present") else [] }}'

# ]]]

# Optional configuration for debops.sshd [[[

# Enabled for performance reasons. X11 forwarding over SSH is not directly used.
sshd__x11_forwarding: 'yes'

# ]]]

Example playbook

Here's an example playbook that can be used to setup and manage X2Go server:


- name: Setup and manage the server-side of X2Go
  hosts: [ 'debops_service_x2go_server' ]
  become: True

  environment: '{{ inventory__environment | d({})
                   | combine(inventory__group_environment | d({}))
                   | combine(inventory__host_environment  | d({})) }}'


    - role: debops-contrib.x2go_server
      tags: [ 'role::x2go_server' ]

This playbooks is shipped with this role under docs/playbooks/x2go_server.yml from which you can symlink it to your playbook directory. In case you use multiple DebOps Contrib roles, consider using the DebOps Contrib playbooks.

Ansible tags

You can use Ansible --tags or --skip-tags parameters to limit what tasks are performed during Ansible run. This can be used after a host was first configured to speed up playbook execution, when you are sure that most of the configuration is already in the desired state.

Available role tags:

Main role tag, should be used in the playbook to execute all of the role tasks as well as role dependencies.