raising standard change using ansible
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2019 05:22 AM
Hi ,
I have created a playbook that raises a change. But I already have a standardized change template. How can I raise a standard change (from standard catalog) ?
Or Is it possible to schedule a change (a standard change) so it gets raised every month just like a cron job? can this be done in the snow portal? What are the steps?
Thanks!
Akki
- Labels:
-
Operational Intelligence

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2019 11:19 AM
HI,
Before creation of this change via playbook you can apply template via script as well. Can you tell me which kind of integration you are using in creation of change.
Thanks,
Ashutosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2019 10:47 AM
Hi Ashutosh,
I am using json to input the details like description, impact, urgency etc in the change. Also raising the change using the rest API. Cant we just raise the already existing standard change? I directly want to raise a standard change as shown below in the screenshot.
##############################My Playbook#######################
- name: Raise a new change.
uri:
url: “https://dev80153.service-now.com/api/now/table/change”
method: POST
user: abc
password: xyz
force_basic_auth: yes
status_code: 201
Thank you,
Akki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2019 12:17 AM
Hello,
Any solution for this. Please let me know.
Thanks,
Akki

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2019 01:09 AM
HI Akki,
I have done this but using a Scripted REST API.
What we did is:
1) Created a Scripted Rest API.
2) In Request body we have sent few details like Template Name or sys_id, caller if any.
3) In Scripted Rest api we wrote a script where it will check for template name and apply the template to new change.
Example Script:
var rec1 = new GlideRecord("change_request");
rec1.initialize();
rec1.applyTemplate("my_std_chg_template");//Name of the template
//...possibly more code here...
rec1.insert();
This works for me.
Thanks,
Ashutosh