debops.machine default variables

General configuration


Enable or disable support for managing static machine information and MOTD.

machine__enabled: True

List of APT packages to install with the debops.machine role enabled.

machine__packages: []

Machine information

These variables manage contents of the /etc/machine-info configuration file. See machine-info(5) and hostnamectl(1) for more details.


Human-readable name of the organization that's responsible for this machine.

machine__organization: '{{ ansible_domain.split(".")[0] | capitalize }}'

Human-readable contact information for this machine - e-mail, phone number or an URL to a web page about a person or team responsible for this host.

machine__contact: '{{ ansible_local.core.admin_public_email[0]
                      | d("root@" + ansible_domain) }}'

Human-readable hostname for this machine.

machine__pretty_hostname: ''

Name of the icon to use for this machine.

machine__icon_name: ''

Specify the machine type to override the autodetected value. Currently recognized chassis types: 'desktop', 'laptop', 'server', 'tablet', 'handset', 'watch', 'vm', 'container'.

machine__chassis: ''

Define the system deployment environment. Suggested values: 'development', 'integration', 'staging', 'production'.

machine__deployment: 'production'

Describe the physical location where a given system can be found, for example a city, or a rack in which the machine is located.

machine__location: ''

Configuration of the /etc/motd file


String or YAML text block with the welcome message stored in the /etc/motd configuration file.

machine__motd: ''

Specify the state of the /etc/motd file, either present (the file exists) or absent (the file will be removed).

machine__etc_motd_state: '{{ "present" if machine__motd|d() else "absent" }}'

Directory which contains scripts that generate the dynamic MOTD.

machine__motd_update_dir: '/etc/update-motd.d'

Configuration of the /etc/issue file


This variable controls if the role should manage the /etc/issue configuration file. If present, the role will divert the distribution file and generate a custom one; if absent, the role will revert the diverted version and will not modify it.

machine__etc_issue_state: 'present'

Path to the Jinja2 template used to generate the /etc/issue configuration file, relative to the templates/ directory of this role.

machine__etc_issue_template: 'etc/issue.j2'

Dynamic Message Of The Day

These variables control the shell scripts that generate the dynamic MOTD. See machine__motd_scripts for more details.


The list of the default MOTD scripts managed by the role.


  # This file comes with the 'base-files' APT package on Debian
  - name: 'uname'
    filename: '10-uname'
    divert: '{{ False
                if (ansible_distribution_release in [ "wheezy", "jessie" ])
                else True }}'
    content: |
      uname -snrvm
    state: '{{ "present"
               if (ansible_distribution_release in [ "wheezy", "jessie" ])
               else "init" }}'

  - name: 'ansible'
    weight: 50
    src: 'etc/update-motd.d/ansible'
    state: 'present'

  - name: 'tail'
    weight: 90
    content: |
      if [ -f /etc/motd.tail ] ; then
          cat /etc/motd.tail
    state: 'present'

  - name: 'fortune'
    weight: 95
    src: 'etc/update-motd.d/fortune'
    state: 'init'

The list of the MOTD scripts which should be present on all hosts in the Ansible inventory.

machine__motd_scripts: []

The list of the MOTD scripts which should be present on hosts in a specific Ansible inventory group.

machine__motd_group_scripts: []

The list of the MOTD scripts which should be present on specific hosts in the Ansible inventory.

machine__motd_host_scripts: []

The list which combines configuration of the MOTD scripts which is passed to the Ansible tasks.

machine__motd_combined_scripts: '{{ machine__motd_default_scripts
                                    + machine__motd_scripts
                                    + machine__motd_group_scripts
                                    + machine__motd_host_scripts }}'