$ ansible-playbook ossec-masters.yml --tags rules
PLAY [ossec-masters] *********************************************************
TASK [dj-wasabi.ossec-server : Installing custom local_rules.xml] ************
changed: [server.example.com]
TASK [dj-wasabi.ossec-server : Installing the local_rules.xml (default local_rules.xml)]
skipping: [server.example.com]
RUNNING HANDLER [dj-wasabi.ossec-server : restart ossec-server] **************
fatal: [server.example.com]: FAILED! => {"failed": true, "msg": "The task includes an option with an undefined variable. The error was: 'ossec_init_name' is undefined\n\nThe error appears to have been in '/path/to/roles/dj-wasabi.ossec-server/handlers/main.yml': line 4, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: restart ossec-server\n ^ here\n"}
PLAY RECAP ******************************************************************
server.example.com : ok=2 changed=1 unreachable=0 failed=1
The ansible-ossec-agent role seems to share the same problem.
In any case, I've fixed this on my local, so I will submit a PR.