-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] module "rule": finicky syntax #335
Comments
See #186 for an in depth discussion about this. |
My problem falls into the same general area, I guess. I didn't get the majority of what is discussed in #186, but at least there was a solution in the mix: Adding
to the condition in my example made the rule idempotent! Replacing Python fragments in the API with JSON is probably a step in the right direction, but if this will really help pushing another markup language through Ansible's YAML we have to see... It's okay to close this issue. |
Ah, just noticed: Changing |
In essence it's about the time when checkmk ansible starts to get Lookup Plugins, with those one can also extract/gather information |
@msekania |
I was thinking about info or facts module that returns (in case of rules)
for hosts:
for folder:
|
This issue has been stale for 60 days. It will close in 7 days. |
There are more lookup plugins on the way: #476 |
As the host/folder/rule lookup modules are in the main branch, I'll close this bug report. |
I think the syntax of the rules module could need some enhancements in the future - or maybe it's the API itself. Probably it's passing Python fragments through YAML without loss...
This fragment
does work (i.e. creates a correct rule), but is not idempotent. Repeating the playbook will create another identical rule, and so on. The "bug"? With
(i.e. without the second pair of quotes), the rule works and is idempotent. Yes, this is shown in the examples, but IMHO it is really hard to find, and the different behaviors are totally unexpected.
I am currently trying to find out how to add a condition based on a host tag:
This should be exactly what the API documentation describes. But again, the rule works (i.e. creates a correct rule with the requested condition) but is no longer idempotent. Is there even a correct syntax??
The text was updated successfully, but these errors were encountered: