I have an ansible tomcat role
defaults/main.yml
tomcat_http:
port: "8080"
protocol: "HTTP/1.1"
connectionTimeout: "120000"
URIEncoding: "UTF-8"
I have another role (app) which uses tomcat role as a dependency and looks like below
defaults/main.yml
app_uriencoding: "ISO-8859-1"
meta/main.yml
dependencies:
- { role: common, tags: app }
- { role: tomcat, tomcat_http.URIEncoding: "{{ app_uriencoding }}", tags: app }
When I run the app role on my targets, Im expecting the URIEncoding value defined in the app role (ISO-8859-1) to be passed to the tomcat role and override the tomcat role default value for uriencoding.
Im unable to pass a value into tomcat roles' {{ tomcat_http.URIEncoding }}
. Some of the options I have tried
tomcat_http.URIEncoding
tomcat_http[URIEncoding]
tomcat_http.["URIEncoding"]
Either I get syntax errors or it just doesn't work. Please let me know if anybody has any ideas on how to pass a value into a mapped variable.