Sometimes I find myself in situations where I need to check the stdout or return code of a command executed on all hosts in a group, and based on some logical rules given the results, determine what to do next. This is sometimes clunky and error-prone to do with jinja2 and set_fact. Consequently, I’m somewhat interested in providing a way (possibly via action plugin) to set variables by passing a function to call and arguments to pass. I have no immediate interest in integrating something like this into the core. I’m primarily looking for guidance and warnings before I try to implement this for a project I’m working on.
- Demitri