I'm trying to use a environment variable called MOLECULE_GROUP to filter out values that do not belong to a certain group. It's easier to show -- I'm trying to turn this:
platforms:
- name: Ubuntu
groups:
- testme
- name: Fedora
groups:
- donttestme
Into this:
platforms:
- name: Ubuntu
groups:
- testme
I would use this to conditionally run scenarios that are members of a certain group by prepending the molecule command with MOLECULE_GROUP=testme. Molecule does not support filtering by groups like this so I want have custom create.yml and destroy.yml etc. but I need to know how to modify the molecule_yml.platforms value.
I tried using combinations of selectattr and map but could not figure it out.