Yep that's correct, the exec_command function doesn't no or care about what it is executing, it just has the command to run passed in as cmd and option input data to send over the stdin pipe. It's up to the caller of exec_command to make sure the command that it wants to run accepts input data and the correct input data is sent in. The _execute_module [1] function in the action plugin base is where all the logic happens to build that script and input data to be run.
[1] - https://github.com/ansible/ansible/blob/11862782fff0ef530d44523676b82dfdf596dfea/lib/ansible/plugins/action/__init__.py#L750 Thanks Jordan -- You received this message because you are subscribed to the Google Groups "Ansible Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-devel/60af43ce-2b2c-4bb1-a644-075e876d4589%40googlegroups.com.