debops.sysfs default variables

Main configuration


Enable or disable sysfs configuration. if the role is disabled, existing sysfs configuration will not be modified. Container environments usually don't allow modification of the /sys filesystem.

sysfs__enabled: '{{ False
                    if (ansible_virtualization_type in [ "lxc", "openvz" ] and
                        ansible_virtualization_role == "guest")
                    else True }}'

The list of default APT packages to install for sysfs support.

sysfs__base_packages: [ 'sysfsutils' ]

The list of additional APT packages to install with sysfsutils.

sysfs__packages: []

Sysfs configuration

These variables define the options you can set in the sysfs filesystem. See sysfs__attributes for more details.


The list of default sysfs attributes defined by the role.


  - name: 'ksm'
    comment: |
      Kernel Same-page Merging (KSM) configuration.
      These parameters can be useful on hosts that are used as Virtual Machine
      hypervisors, to allow for lower memory footprint of virtual machines,
      however this feature has certain security risks.
    state: 'defined'

      - name: 'kernel/mm/ksm/run'
        comment: 'Enable Kernel Same-page Merging'
        value: 1

      - name: 'kernel/mm/ksm/sleep_milisecs'
        comment: 'How long to sleep between scans, in miliseconds'
        value: 20

      - name: 'kernel/mm/ksm/pages_to_scan'
        comment: 'How many pages to scan in one run'
        value: 100

  - name: 'transparent_hugepages'
    comment: |
      Configuration of Transparent HugePages support.
      Disable THP by default to increase performance in certain applications
      like MongoDB, Redis, MariaDB, PostgreSQL. This is only effective when
      real HugePages support is configured.
    state: 'defined'

      - name: 'kernel/mm/transparent_hugepage/enabled'
        value: 'never'

      - name: 'kernel/mm/transparent_hugepage/defrag'
        value: 'never'

      - name: 'kernel/mm/transparent_hugepage/khugepaged/defrag'
        value: 0

The list of sysfs attributes defined on all hosts in the Ansible inventory.

sysfs__attributes: []

The list of sysfs attributes defined on hosts in a specific Ansible inventory group.

sysfs__group_attributes: []

The list of sysfs attributes defined on specific hosts in the Ansible inventory.

sysfs__host_attributes: []

The list of sysfs attributes defined by other Ansible roles through role dependent variables.

sysfs__dependent_attributes: []

The variable which is used to filter the data from dependent variables, join it with the data from other roles and pass it to the combined attributes variable.

sysfs__dependent_attributes_filter: '{{ lookup("template",
                                               | from_yaml }}'

The variable which combines all of the attribute configuration and is used in the Ansible tasks. It also defines the other in which different attribute variables are combined.

sysfs__combined_attributes: '{{ sysfs__default_attributes
                                + sysfs__dependent_attributes_filter
                                + sysfs__attributes
                                + sysfs__group_attributes
                                + sysfs__host_attributes }}'