On 10. juli 2016 00:11, Szabolcs Szallár wrote:
Logical structure:

site.yml
└── roles
       └── base
           └── tasks
              └── main.yml

Example line in main.yml:

  - name: configure iptables rules
    template: src=iptables_config.j2 dest=/etc/sysconfig/iptables owner=root
group=root mode=0600
    notify:
     - iptables restart

In roles directory I have a task with main.yml, and from that main.yml I
add package configuration with template.
When the template is updated, I have a handler called, but for some reason
it's not executed.

Handlers are in same level as site.yml:

└── handlers
     └── main.yml

Try moving your handlers folder into the role, same level as your tasks under base.

 roles
  └── base
       ├── tasks
       │    └── main.yml
       └── handlers
            └── main.yml


--
Kai Stian Olstad

--
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/5783A14F.6090606%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to