############################################################################ # Program : QA-DAILY-MONITORING-REPORT # : Script: updated_Daily_qa_report.yml {{ansible}} # : Monitor_register& copy output to default server(localhost) # : Merge output into one file(csv or anything) # : Email Merged report to the team! # Author : FWERE # Team : Documentum # Date : Aug 14,2018 ############################################################################
--- - hosts: Prod_index_servers tasks: - name: ping all hosts ping: # Stop Method services
- name: Execute QA REPORT STATUS command: sh /app/documentum/fwerescripts/monitoring/DailyAppReport.sh - name: check for successes results command: cat /tmp/title-report.txt register: newreport
- name: Copy Results to temp folder fetch: src: /tmp/title-report.txt dest: "/tmp/{{ inventory_hostname }}.qa-report" mode: 0774 flat: yes - name: Merge files run_once: yes delegate_to: localhost shell: "cat /tmp/{{ inventory_hostname }}.qa-report >> /tmp/qa_report.sourcelist"
- name: check for successes results debug: msg={{ newreport }} #command: cat {{ myfile|quote }}