From ae35d3d7e080c9c1170ca4a53934d464c63f72da Mon Sep 17 00:00:00 2001 From: Patrick Toal Date: Wed, 17 Apr 2024 15:38:28 -0400 Subject: [PATCH] Modify attachment --- playbooks/investigate_high_cpu.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/playbooks/investigate_high_cpu.yml b/playbooks/investigate_high_cpu.yml index f5d272b..d237695 100644 --- a/playbooks/investigate_high_cpu.yml +++ b/playbooks/investigate_high_cpu.yml @@ -16,8 +16,10 @@ changed_when: false - name: Create Problem Template - ansible.builtin.set_fact: - incident_report: "{{ lookup('template', '../templates/cpuhog_ticket.j2') }}" + ansible.builtin.template: + src: '../templates/cpuhog_ticket.j2' + dest: /tmp/cpuhog_details.md + delegate_to: localhost - name: Create SNow Incident servicenow.itsm.incident: @@ -39,8 +41,9 @@ description: "Generator URL: {{ alertmanager_generator_url }}" impact: high urgency: high - other: - user_input: "Information from Ansible: {{ incident_report }}" + attachments: + - path: /tmp/cpuhog_details.md + name: cpuhog_details.md register: problem_result - name: Update Incident