My program is in Python and my configuration file is in yaml. I would like to use variables and some math expressions in my yaml file. (eg: $var + $offset) It seems like Ansible supports both, but I am not familiar with Ansible and not sure whether I can only import the part which handles yaml configuration. Any help will be appreciated.
Reference: Ansible - Can I use arithmetic when setting a variable value?
Update:
Ideally, I would like to use playbook feature from Ansible as a library. Something like described here: http://oriolrius.cat/blog/2015/01/21/using-ansible-like-library-programming-in-python/ But I couldn't make it work seems like the instruction is outdated.