debops.neurodebian default variables

General configuration


What is the desired state which this role should achieve? Possible options:


Default. Ensure that repositories and packages provided by NeuroDebian are installed and configured as requested.


Ensure that repositories and packages provided by NeuroDebian are absent.

neurodebian__deploy_state: 'present'

When the upstream support is enabled, Ansible will configure NeuroDebian APT repositories directly. When it's disabled, the role will install the neurodebian APT package included in Debian and let it configure the repositories. The package is included since Debian Stretch.

neurodebian__upstream: '{{ True
                           if (ansible_distribution_release in
                               [ "wheezy", "jessie", "trusty" ])
                           else False }}'

NeuroDebian packages and installation


The APT packages to install for NeuroDebian support.

neurodebian__support_packages: [ 'neurodebian', 'netselect' ]

List of global packages for NeuroDebian. This variable is intended to be used in Ansible’s global inventory.

neurodebian__packages: []

List of group packages for NeuroDebian. This variable is intended to be used in a host inventory group of Ansible (only one host group is supported).

neurodebian__group_packages: []

List of host packages for NeuroDebian. This variable is intended to be used in the inventory of hosts.

neurodebian__host_packages: []

List of APT packages to install for other Ansible roles, for usage as a dependent role.

neurodebian__dependent_packages: []

Upstream APT repository configuration

Refer to for details.


The OpenPGP key fingerprint for the key by which the NeuroDebian APT repository is signed.

neurodebian__apt_key_fingerprint: 'DD95 CC43 0502 E37E F840  ACEE A5D3 2F01 2649 A5A9'

The NeuroDebian repository component/flavor to enable. Supported choices: main, contrib, non-free.

  - 'main'
  - '{{ [ "contrib", "non-free" ]
        if (ansible_local.apt.nonfree|d()|bool)
        else [] }}'

List of source types to configure for the NeuroDebian repository. Supported choices: deb, deb-src.

neurodebian__apt_source_types: [ 'deb' ]

A rough estimate of the region (country) a given host resides in, based on the system locale settings. This variable is used to select a mirror near the host, and might be inaccurate.

neurodebian__region: '{{ ansible_local.locales.system_region|d("US") }}'

YAML dictionary that maps country codes (taken from the locale) to NeuroDebian mirrors.

  'AU': 'au'
  'CA': 'us-nh'
  'CN': 'cn-hf'
  'DE': 'de-m'
  'ES': 'de-m'
  'FR': 'de-md'
  'GB': 'de-m'
  'GR': 'gr'
  'IT': 'de-m'
  'JP': 'jp'
  'NZ': 'au'
  'PL': 'de-md'
  'RU': 'de-md'
  'US': 'us-nh'

YAML dictionary that contains a list of NeuroDebian mirrors, taken from the page.


  # Australia (AARNET)
  'au':     ''

  # China (Tsinghua University)
  'cn-bj1': ''

  # China (University of Science and Technology of China)
  'cn-hf':  ''

  # China (Zhejiang University)
  'cn-zj':  ''

  # Germany (G-Node, LMU Munich)
  'de-m':   ''

  # Germany (University of Magdeburg)
  'de-md':  ''

  # Greece (Aristotle University of Thessaloniki)
  'gr':     ''

  # Japan (Kiyotaka Nemoto)
  'jp':     ''

  # USA-CA (Paul Ivanov, California)
  'us-ca':  ''

  # USA-NH (Dartmouth College)
  'us-nh':  ''

  # USA-TN (Vanderbilt)
  'us-tn':  ''

The variable that specifies the NeuroDebian mirror to use, selected via the host's region taken from the system locale settings.

neurodebian__apt_mirror: '{{ neurodebian__region_mirror_map[neurodebian__region]
                             | d("us-nh") }}'

The NeuroDebian APT repository mirror URI to use.

neurodebian__apt_mirror_uri: '{{ neurodebian__apt_mirror_map[neurodebian__apt_mirror] }}'

Configuration for other Ansible roles


APT pinning for packages from the NeuroDebian repository. By default (without this pinning), both the official Debian repositories and NeuroDebian have the same preference which would lead to APT picking the package with the highest version regardless from which repository it comes from.

As NeuroDebian provides many additional packages along with more recent versions of packages already available in official Debian releases, APT pinning is used to ensure that package versions available in official Debian releases are preferred even if NeuroDebian provides newer versions.

The job of setting up the APT pinning is offloaded to the debops.apt_preferences role which is instructed using this variable.


  - package: '*'
    reason: |-
      Pin NeuroDebian with priority 80 which is lower then the official Debian backports (100).
      This also works when `apt_preferences__preset_list` is set which increases
      Debian backports to 400 and decreases Debian testing to 50.
    by_role: 'debops.neurodebian'
    pin: 'release o=NeuroDebian'
    priority: '80'
    state: '{{ "present" if (neurodebian__deploy_state == "present") else "absent" }}'

Configuration for the debops.keyring Ansible role.


  # This is needed to avoid apt_key removing the GPG key from the
  # 'neurodebian-archive-keyring' APT package
  - id: '{{ neurodebian__apt_key_fingerprint if neurodebian__upstream|bool else "" }}'
    state: '{{ "present"
               if (neurodebian__deploy_state == "present" and
               else "absent" }}'