Any way to include_vars on output of a filter?

Howdy folks,

I’m looking for some advice to see if there’s a more elegant way to
do an “include_vars” on the output of a filter rather than a file.

I’m using the “passwordstore” module to get secrets out of ‘pass’.
This works great for pulling in a single var at a time, but I’d like
to be able to import an entire host/group vars file.

Currently what I’ve got working is something like:

  • create a temporary local file with contents of the lookup(‘passwordstore’)
    filter output using local_action
  • include_vars on the temp file
  • delete temp file with another local_action

I was just wondering if anyone’s got an easier way to do this or a one-liner
that can merge the output of lookup(‘passwordstore’) into ansible’s vars table.

Also, I know about Vault, but can’t use it in this case.

Thanks,

Kelley Spoon