tmt
tmt copied to clipboard
Allow `when` key for step configs
For simple on/off of the config based on the context it will be much more readable than using 'adjust' and having to think about the final ordering of the configs.
No changes to the config will be allowed (no modification of values) just 'enable' config if when
is evaluated true
Compare:
adjust:
- when: distro == fedora
prepare+:
- name: Fedora specific stuff
how: shell
script: <some script>
--snip more adjust rules and discover/provision/...---
prepare:
- name: run this each time
how: shell
with
prepare:
- name: run this each time
how: shell
- name: Fedora specific stuff
how: shell
script: <some script>
when: distro == fedora