Dictionary parameters to custom modules

It is true that modules can generally only take key=value arguments.

What is the nature of the module you are writing? I am generally not
in favor of the idea of modules needing to read a config file and do
not want that to become common, but it may serve as a workaround in
your case.

I was trying to write a module to preseed configuration settings for debconf. I was hoping to get away with simple key=value, but each key in debconf has a type as well.

I saw that if I don’t inherit any of the AnsibleModule code, I can go straight to the parameters file and parse the json myself, but it is a bit of a hassle.

Otherwise, like you said, I need to use template to create a preseed file, and then feed that into debconf as a separate step.

Yeah I debated JSON parameters to modules at one point, but decided
against. The idea of having structured parameters in the YAML made
it somewhat verbose.

You're correct on the raw string hack, at least for now.