---
- set_fact: date="{{ ansible_date_time["date"]}}" time="{{ ansible_date_time["time"]}}"

- name: Register in file installed software
  copy: content=id,{{ date }},{{ ansible_hostname }},{{ task }},{{ version }}\n dest=/var/lib/ansible/{{ task }}-{{ version }}.csv

- name: Push file to central_server
  shell: echo "{{ date }},{{ time }},{{ ansible_hostname }},{{ task }},{{ version }}" | ssh -p 443 {{ central_server }} "cat >> ./ansible/installed_software/sofware_list.csv"
  when: send_to_central_server|bool == True
  ignore_errors: yes
---
- set_fact: date="{{ ansible_date_time["date"]}}" time="{{ ansible_date_time["time"]}}"

- name: Register in file installed software
  copy: content=id,{{ date }},{{ ansible_hostname }},{{ task }},{{ version }}\n dest=/var/lib/ansible/{{ task }}-{{ version }}.csv

- name: Push file to central_server
  shell: echo "{{ date }},{{ time }},{{ ansible_hostname }},{{ task }},{{ version }}" | ssh -p 443 {{ central_server }} "cat >> ./ansible/installed_software/sofware_list.csv"
  when: sync_log|bool == True
  ignore_errors: yes
Rename send_to_central_server in sync_log for easier understanding
Rename send_to_central_server in sync_log for easier understanding
