Small task:
- name: Configure hosts
template: src=host.cfg.j2 dest=/etc/shinken/hosts/{{item.host_name}}.cfg
with_items: shinken_hosts
when: shinken_hosts is defined
notify: reload config
I want to remove all other configs (files) in /etc/shinken/hosts/ configured by this task.
How can I do this?
(It is really important if I fix a typo in 'shinken_hosts', and want to automatically remove old config with mistake in the name).