Getting started

Default configuration

The sysfs configuration will not be applied by default in a container environment (LXC, OpenVZ), since these environments usually have the /sys filesystem mounted read-only. You can control this using the sysfs__enabled variable.

Example inventory

To configure the /sys kernel filesystem on a host by the debops.sysfs role, that host needs to be added to the [debops_service_sysfs] Ansible inventory group:


Example playbook

If you are using this role without DebOps, here's an example Ansible playbook that uses the debops.sysfs role:


- name: Configure sysfs options
  hosts: [ 'debops_service_sysfs' ]
  become: True

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


    - role: debops.sysfs/env
      tags: [ 'role::sysfs', 'role::secret' ]

    - role: debops.secret
      tags: [ 'role::secret', 'role::sysfs' ]
        - '{{ sysfs__secret__directories | d([]) }}'

    - role: debops.sysfs
      tags: [ 'role::sysfs', 'skip::sysfs' ]