Hello,
please bare with me because my Ansible skills are close to none. I only use it
for Fedora CI.
I've read
https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.ht...
I have this (simplified) tests.yml:
---
- hosts: localhost
roles:
- role: standard-test-basic
tests:
- smoke:
dir: python/smoke
run: VERSION=3.11 ./venv.sh
required_packages:
- python3.11
- python3.11-devel
Full version in
https://src.fedoraproject.org/rpms/python3.11/blob/rawhide/f/tests/tests.yml
I would like to replace all occurrences of 3.11 with a variable:
---
- hosts: localhost
roles:
- role: standard-test-basic
tests:
- smoke:
dir: python/smoke
run: VERSION={{ pybasever }} ./venv.sh
required_packages:
- python{{ pybasever }}
- python{{ pybasever }}-devel
But where do I put pybasever: '3.11' exactly?
Bonus question: Can I read the tested package name and regex it into the variable?
pybasever: {{ xxx_package_name|pex_regex_replace('^python', '') }}
Thanks,
--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok