sr2c.podman.subid_ranges filter – Parse subordinate ID file content

Note

This filter plugin is part of the sr2c.podman collection (version 0.0.1).

It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install sr2c.podman.

To use it in a playbook, specify: sr2c.podman.subid_ranges.

Synopsis

  • Parses the content of /etc/subuid or /etc/subgid into a list of ranges.

  • Blank lines and comments are skipped. Any other line that is not owner:start:count is an error.

Input

This describes the input of the filter, the value before | sr2c.podman.subid_ranges.

Parameter

Comments

Input

string / required

Content of the subordinate ID file.

Positional parameters

This describes positional parameters of the filter. These are the values positional1, positional2 and so on in the following example: input | sr2c.podman.subid_ranges(positional1, positional2, ...)

Parameter

Comments

path

string

Path of the file, used in error messages.

Default: "subordinate ID file"

Examples

subuid_ranges: "{{ subuid_file.content | b64decode | sr2c.podman.subid_ranges('/etc/subuid') }}"

Return Value

Key

Description

Return value

list / elements=dictionary

One entry per range, with owner, start, count and end.

end is one past the last ID in the range.

Returned: success

Authors