I’m struggling to find the sollution to this ‘problem’.
I’ve created a role that installs and configures tomcat. After this is complete I’d like the role to update the webservers’ /etc/httpd/conf.d/{{ vhost_instance_name }}.conf with the AJP connection strings.
For this I’d probably need a lineinfile and search for the regexp and place it before that regexp.
Now the regexp is something I can overcome myself, what I can’t seem to solve is how I invoke a task to update the webservers’s conf when the role’s target is the application server.
Well I’m not using a template since I’ve already used a template to configure the vhost when I Installed the apache webserver.
If I create a new vhost with only the proxy pass than it will get full of vhost files very fast, especcialy on a webserver which hosts more then 20 websites.