yes, that's what I am looking into now. I deploy the configuration for the app through a different task, which doesn't change very often. caking the RPM-initscripts to restart the app looks like the cleanest way forward.
On Thursday, March 6, 2014 9:47:52 AM UTC, Johan Wärlander wrote: > > I'd normally have the RPM do the work of restarting after installation > (upgrade), at least if it's always to be done, and is a safe thing. Given > your role above, that seems to be true.. If so, you would only need the > "common" role. > > Now, if you need to reconfigure stuff after installing the application, > then you would of course put that in a separate role, and notify after > changing the config so the app will get restarted. > > Den måndagen den 3:e mars 2014 kl. 17:02:42 UTC+1 skrev Azul Inho: >> >> >> >> In my role "common" I have: >> >> - name: yum install OS >> updates >> >> >> shell: yum update >> -y >> >> >> >> and then in my "application" role I have: >> >> - name: install app1 >> yum: name=app1 state=present >> notify: >> - restart app1 >> >> >> This app1 is built in house and deployed to a local yum repo managed by >> jenkins, so every time I run the "common" role it gets updated to the >> latest version. As a result when the 'application' role runs my 'app1' no >> longer needs to be updated so my restart app1 handler never gets executed. >> >> Any ideas how to 'fix this' ? >> Today I am simply restarting app1 every time I run ansible on this host >> which is not ideal. >> >> >> -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/06cdad28-2a24-485f-9799-4d1cad032af2%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
