diff --git a/changelogs/fragments/169_add_lineseparator_to_command.yml b/changelogs/fragments/169_add_lineseparator_to_command.yml new file mode 100644 index 0000000..9497ba5 --- /dev/null +++ b/changelogs/fragments/169_add_lineseparator_to_command.yml @@ -0,0 +1,3 @@ +--- +bugfixes: + - at - append line-separator to the end of the ``command`` (https://github.com/ansible-collections/ansible.posix/issues/169). diff --git a/plugins/modules/at.py b/plugins/modules/at.py index b29b35e..a35ec4e 100644 --- a/plugins/modules/at.py +++ b/plugins/modules/at.py @@ -129,7 +129,7 @@ def get_matching_jobs(module, at_cmd, script_file): def create_tempfile(command): filed, script_file = tempfile.mkstemp(prefix='at') fileh = os.fdopen(filed, 'w') - fileh.write(command) + fileh.write(command + os.linesep) fileh.close() return script_file