I just found out that Ansible does not handle Sparse Files (A file with true empty space inside it) properly with the copy module. I don't think this is a bug, but somebody should mention this in the documentation.
http://en.wikipedia.org/wiki/Sparse_fileCode to make a sparse file
#!/usr/bin/perl
## Code Blatantly stolen from Elizabeth Zwicky
#
open (HOLEYFILE, ">filewithbighole") ||
warn "Can't create filewithbighole\n";
select (HOLEYFILE);
$| = 1;
select (STDOUT);
seek (HOLEYFILE, 1024* 1024 * 1024, 0);
print HOLEYFILE "After the hole\n";
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks) = stat HOLEYFILE;
if ($blocks * $blksize == $size) {
warn "My holey file had no holes!\n";
}
close HOLEYFILE;
Ansible command
ansible AIX-7.1 -m copy -a "src=/home/ME/filewithbighole dest=/tmp/filewithbighole"
It fails as running out of disk space. It's not a big deal as there are workarounds, like tar-ing up the file with the -S option to efficiently handle Sparse files.
[ME@ansible ~]$ ls -l filewithbighole
-rw-r--r--. 1 urew users 1073741839 Oct 5 18:44 filewithbighole
[ME@ansible ~]$ du -k filewithbighole
4 filewithbighole
[ME@ansible ~]$ !tar
tar -Scf filewithbighole.tar ./filewithbighole
[ME@ansible ~]$ ls -lt filewithbighole.tar
-rw-r--r--. 1 urew users 10240 Oct 5 18:48 filewithbighole.tar
[ME@ansible ~]$ du -k filewithbighole.tar
12 filewithbighole.tar
>>>>Ericw