hi. thaks for many answer.
i feel ugly a little for use 'when' (thanks Paul), and feel tricky to fire handler with condition (thanks Dick). i decide to restart service all enviroments. thanks. 2015年8月5日水曜日 22時27分57秒 UTC+9 Ichiro MATSUNAGA: > > Hi > > I want to fire handler with condition. > for example, when change httpd.conf, i want to restart apache on staging, > bun not want on production. > > what should i do? > > ``` > inventory/staging > httpd_restart=true > > inventory/production > httpd_restart=false > > tasks: > # i want to fire when inventory is staging > # but not fire when inventory is production > - copy: src=httpd.conf dest=/etc/httpd/httpd.conf > handler: > - service name=httpd state=restart > ``` > > thanks. > > -- 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/64e334ad-6681-4dc2-ade3-0114db62f0c7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
