On 2016/01/13 21:39, Frank Groeneveld wrote:
> Yesterday a new major Ansible release was done. Attached a diff that updates
> the port to it's latest version. I tested this lightly, so please test this
> on various playbooks and hosts.
> 
> Any comments, suggestions or bugs?

Please CC rpe@ (maintainer) :)

> Index: patches/patch-lib_ansible_plugins_action_copy_py
> ===================================================================
> RCS file: patches/patch-lib_ansible_plugins_action_copy_py
> diff -N patches/patch-lib_ansible_plugins_action_copy_py
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-lib_ansible_plugins_action_copy_py  13 Jan 2016 19:35:30 
> -0000
> @@ -0,0 +1,12 @@
> +$OpenBSD$
> +--- lib/ansible/plugins/action/copy.py.orig  Wed Jan 13 21:13:56 2016
> ++++ lib/ansible/plugins/action/copy.py       Wed Jan 13 21:14:39 2016
> +@@ -299,6 +299,8 @@ class ActionModule(ActionBase):
> +         content = to_bytes(content)
> +         try:
> +             f.write(content)
> ++            if not content.endswith('\n'):
> ++              f.write('\n')
> +         except Exception as err:
> +             os.remove(content_tempfile)
> +             raise Exception(err)

And since this just moved from the following patch, please copy across the 
comment:

> -$OpenBSD: patch-lib_ansible_runner_action_plugins_copy_py,v 1.1 2014/09/10 
> 20:21:43 rpe Exp $
> -
> -https://github.com/adamchainz/ansible/commit/842a1b976d650b2c3117a6e0ed1329e5d0d62873
> -
> -'copy' write new line at end of file if 'content' passed without newline
^^

Reply via email to