-
Notifications
You must be signed in to change notification settings - Fork 1
/
itsm_change_create_cisco.yml
40 lines (35 loc) · 1.06 KB
/
itsm_change_create_cisco.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
---
- name: Create ServiceNow incident ticket
hosts: localhost
gather_facts: false
tasks:
- name: Create incident
servicenow.itsm.change_request:
instance:
host: "{{ SN_HOST }}"
username: "{{ SN_USERNAME }}"
password: "{{ SN_PASSWORD }}"
state: new
type: emergency
requested_by: splunk_ansible_workflow
short_description: "Cisco Certificate Request"
description: "Cisco Host Requires Certificate"
priority: high
impact: low
risk: low
category: network
other:
planned_start: "{{ lookup('pipe','date +%Y%m%d%H%M%S')}}"
answer: true
register: change_out
- name: Set fact for change number
ansible.builtin.set_fact:
#change_number: 'CHG0030022'
change_number: "{{ change_out.record.number }}"
- name: Debug change number
debug:
msg: "{{ change_number }}"
- name: Set change Number
ansible.builtin.set_stats:
data:
change_number: "{{ change_number }}"