I would like to use include the base_url in emails that I send via from flow. The base_url is defined under the webserver section of the config in airflow.cfg
What's the easiest way to these variables in any operator? Currently, I send email using my own PythonOperator (so that I can send both text and html multipart email). Hence, I access the config using the code below.
parser = SafeConfigParser()
parser.read('airflow.cfg')
base_url = parser.get('webserver', 'base_url')
This works, but I was wondering if there is a more elegant way? Also, this only works for PythonOperators, but what if I need to access a configuration parameter in any operator in a Jinja template?