ansible/ansible — pull request #6536 by risaacson (2014-03-17 23:25:19+00:00)
Title: assemble module: add newline between assembled files

Closes GH-6353

This work builds on GH-6353 which is a fix for 6353 by @pgehres and makes sure that a newline is only added if the previous file fragment does not end with a newline.

To demonstrate this I have tested against the following:
devel = ansible 1.6 (devel 9da26da335) last updated 2014/03/17 17:19:05 (GMT -500)
(pgehres/)6353-assemble = ansible 1.6 (6353-assemble f0a0c58d5c) last updated 2014/03/17 15:56:54 (GMT -500)
(risaacson/)pull_6359 = ansible 1.6 (pull_6359 c4fea9fe0c) last updated 2014/03/17 17:38:09 (GMT -500)

Files:

fragment0
```
0
```

fragment1
```
1

```

fragment2
```
2

```

fragment3
```
3
```

fragment4
```
4
```

fragment5
```
5

```

fragment6 is an empty directory.

Without delimiters:
devel
```
01
2

345

```

(pgehres/)6353-assemble
```
0
1

2

3
4
5

```

(risaacson/)pull_6359
```
0
1
2

3
4
5

```

With delimiters:
devel
```
0-=- Fragment Boundry -=-
1
-=- Fragment Boundry -=-
2

-=- Fragment Boundry -=-
3-=- Fragment Boundry -=-
4-=- Fragment Boundry -=-
5

```

(pgehres/)6353-assemble
```
0
-=- Fragment Boundry -=-
1

-=- Fragment Boundry -=-
2

-=- Fragment Boundry -=-
3
-=- Fragment Boundry -=-
4
-=- Fragment Boundry -=-
5

```

(risaacson/)pull_6359
```
0
-=- Fragment Boundry -=-
1
-=- Fragment Boundry -=-
2

-=- Fragment Boundry -=-
3
-=- Fragment Boundry -=-
4
-=- Fragment Boundry -=-
5

```