Open VannTen opened 1 week ago
Files identified in the description:
plugins/filter/counter.py
plugins/filter/crc32.py
plugins/filter/dict.py
plugins/filter/dict_kv.py
plugins/filter/from_csv.py
plugins/filter/from_ini.py
plugins/filter/groupby_as_dict.py
plugins/filter/hashids.py
plugins/filter/hashids_decode.yml
plugins/filter/hashids_encode.yml
plugins/filter/jc.py
plugins/filter/json_query.py
plugins/filter/keep_keys.py
plugins/filter/lists.py
plugins/filter/lists_difference.yml
plugins/filter/lists_intersect.yml
plugins/filter/lists_mergeby.py
plugins/filter/lists_symmetric_difference.yml
plugins/filter/lists_union.yml
plugins/filter/random_mac.py
plugins/filter/remove_keys.py
plugins/filter/replace_keys.py
plugins/filter/reveal_ansible_type.py
plugins/filter/time.py
plugins/filter/to_days.yml
plugins/filter/to_hours.yml
plugins/filter/to_ini.py
plugins/filter/to_milliseconds.yml
plugins/filter/to_minutes.yml
plugins/filter/to_months.yml
plugins/filter/to_seconds.yml
plugins/filter/to_time_unit.yml
plugins/filter/to_weeks.yml
plugins/filter/to_years.yml
plugins/filter/unicode_normalize.py
plugins/filter/version_sort.py
tests/unit/plugins/filter/test_crc32.py
If these files are incorrect, please update the component name
section of the description or use the !component
bot command.
cc @Ajpantuso @cfiehe @ericzolf @felixfontein @giner @jouir @keilr @kellyjonbrazil @resmo @sscheib @vbotka click here for bot help
!component =plugins/filter/
Files identified in the description:
plugins/filter/
If these files are incorrect, please update the component name
section of the description or use the !component
bot command.
Summary
I am trying to convert systemd slice names to the corresponding cgroup trees using ansible filters, which bogs down to:
my-slice-foo.slice -> /my.slice/my-slice.slice/my-slice-foo.slice
(slice are always in a hierarchy and include the parent slice in their own name, and this is reflected in the hierarchy).
I had no luck finding a way to achieve this using only variable (and I'd rather not use fact and loops for that) but
accumulate
( which would be a pass-through to the matching python function in itertools would make that easy.I do believe that while my usecase in rather specialized, the underlying transformation is a general tool which would be useful for a variety of purpose.
(I implement the PR for that myself btw).
If there is a already available way to this without a new filter / lookup, I'm happy to hear about it :)
Issue Type
Feature Idea
Component Name
plugins/filter/
Additional Information
Code of Conduct