Выведите через debug: var haproxy_files_result и посмотрите что там лежит
json
[ip_address here] => {
"haproxy_files_result": {
"changed": false,
"msg": "All items completed",
"results": [
{
"ansible_loop_var": "item",
"changed": false,
"failed": false,
"invocation": {
"module_args": {
"checksum_algorithm": "sha1",
"follow": false,
"get_attributes": true,
"get_checksum": true,
"get_mime": true,
"path": "/etc/haproxy/haproxy.cfg"
}
},
"item": "/etc/haproxy/haproxy.cfg",
"stat": {
"exists": false
}
},
{
"ansible_loop_var": "item",
"changed": false,
"failed": false,
"invocation": {
"module_args": {
"checksum_algorithm": "sha1",
"follow": false,
"get_attributes": true,
"get_checksum": true,
"get_mime": true,
"path": "/etc/keepalived/keepalived.conf"
}
},
"item": "/etc/keepalived/keepalived.conf",
"stat": {
"exists": false
}
}
],
"skipped": false
}