ricbra / ansible-logentries

Ansible role for installing logentries agent and daemon
17 stars 12 forks source link

Doesn't re-register if host is removed on logentries #2

Closed riemers closed 9 years ago

riemers commented 9 years ago

If you have someone that deleted the host (on logentries), while this should not be the case it will not reregister. The register command will fail with:

Warning: Server already registered. Use --force to override current registration.

So you could do a catch on that and "re-register", if i read it correctly, something like:

when: "'already registered' in result_register.stderr"

As a note, if you don't have the latest ansible extra modules, the "name" entry will fail. Was updated at some point, but mine came with an older version it seemed.

ricbra commented 9 years ago

Hi @Snelvuur ,

Thanks for reporting this. It should be fairly easy to create a workaround indeed. Feel free to submit a PR if you've fixed this before me. I'll be AFK until next week.

Regarding the "name" issue: Should I increase the minimal Ansible version in the meta file? If so, would you mind to create a separate issue for that? Right now its configured at a minimum Ansible version 1.2.

riemers commented 9 years ago

Hardly can call it a pull request (https://github.com/ricbra/ansible-logentries/pull/3) but i had all kind of conditions around it and then this --force option, why would i bother making it seperate if you can do it initially ;)

ricbra commented 9 years ago

You're right, thanks for the work. I'm closing this one.