Hi,
I am using the ‘copy content’ module to grab the contents of a file from an old version of F5 (where the copy / fetch module doesn’t work due to simplejson not being available)
Here is an extract play I have put together:
- name: “Backup BigIP v10 Config”
raw: ‘!/bin/bash -c “cat /config/bigip.conf”’
register: bigip10 - local_action: copy content=“{{ bigip10.stdout }}” dest=“/path/here/{{ inventory_hostname }}.bigip.conf”
…and this is working for the most part except when the file is LARGE.
The problem is one of the files I want to grab is around 5000 lines and I get the following ‘no descriptive’ error:
TASK [copy] ********************************************************************
task path: /path/to/playbooks/f5_backups.yml:10
fatal: [XXXXX-XX]: FAILED! => {
“failed”: true,
“msg”: "{‘stderr’: u’', ‘stdout’:
The only thing I can think is that this must be some sort of buffer error as if I grab a smaller file from the same device - it works a treat.
Before anyone suggests that I need to use the fetch module - I have tried this and it fails with: (even though it says successful!)
XXXXX-XX| SUCCESS => {
“changed”: false,
“file”: “/config/bigip.conf”,
“msg”: “unable to calculate the checksum of the remote file”
}
Oh and the ansible version we are running is 2.2.1.0
Any ideas how to get to the bottom of / solve this will be gratefully received!
Thanks in advance!