-
Notifications
You must be signed in to change notification settings - Fork 1
/
itsm_change_update_cisco.yml
62 lines (53 loc) · 1.72 KB
/
itsm_change_update_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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
- name: Update ServiceNow incident ticket
hosts: localhost
gather_facts: false
tasks:
- name: Mark change request as authorize
servicenow.itsm.change_request:
instance:
host: "{{ SN_HOST }}"
username: "{{ SN_USERNAME }}"
password: "{{ SN_PASSWORD }}"
number: "{{ change_number }}"
state: authorize
on_hold: false
assignment_group: 'Change Management'
other:
planned_start: "{{ lookup('pipe','date +%Y%m%d%H%M%S')}}"
answer: true
register: change
- name: Mark change request as scheduled
servicenow.itsm.change_request:
instance:
host: "{{ SN_HOST }}"
username: "{{ SN_USERNAME }}"
password: "{{ SN_PASSWORD }}"
number: "{{ change_number }}"
state: scheduled
assignment_group: 'Change Management'
on_hold: false
register: change
- name: Mark change request as implement
servicenow.itsm.change_request:
instance:
host: "{{ SN_HOST }}"
username: "{{ SN_USERNAME }}"
password: "{{ SN_PASSWORD }}"
number: "{{ change_number }}"
state: implement
#assignment_group: 'Change Management'
register: change
- name: Mark change request as review
servicenow.itsm.change_request:
instance:
host: "{{ SN_HOST }}"
username: "{{ SN_USERNAME }}"
password: "{{ SN_PASSWORD }}"
number: "{{ change_number }}"
state: review
assignment_group: 'Change Management'
register: change
#- name: Set fact for change number
# ansible.builtin.set_fact:
# change_number: "{{ change_out.record.number }}"