This module is part of the servicenow.itsm collection (version 2.7.0).
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install servicenow.itsm
.
To use it in a playbook, specify: servicenow.itsm.change_request_task
.
New in servicenow.itsm 1.3.0
- Create, delete or update a ServiceNow change request tasks.
- For more information, refer to the ServiceNow change management documentation at https://docs.servicenow.com/bundle/tokyo-it-service-management/page/product/change-management/concept/c_ITILChangeManagement.html.
Parameter |
Comments |
|
---|---|---|
assigned_to string |
The user that the change task is assigned to. |
|
assignment_group string |
The name of the group that the change task is assigned to. Mutually exclusive with |
|
assignment_group_id string added in servicenow.itsm 2.4.0 |
The id of the group that the change task is assigned to. Mutually exclusive with |
|
change_request_id string |
sys_id of the change request this task belongs to. Mutually exclusive with change_request_number. |
|
change_request_number string |
number of the change request this task belongs to. Note that contrary to change_request_id, change request number may not uniquely identify a record. In case there are more change requests with the same number, the module fails and does nothing. Mutually exclusive with change_request_id. |
|
change_request_task_mapping dictionary added in servicenow.itsm 1.3.0 |
User mapping for Change request task object, where user can override Choice Lists values for objects. |
|
state dictionary |
The state of the change request task. Cannot be changed to |
|
close_code string |
Provide information on how the change task was resolved. The change task must have this parameter set prior to transitioning to the Choices:
|
|
close_notes string |
Resolution notes added by the user who closed the change task. The change task must have this parameter set prior to transitioning to the |
|
configuration_item string |
The configuration item (CI) or service name that the change task applies to. Note that contrary to configuration_item_id, configuration item names may not uniquely identify a record. In case there are more configuration items with the same name, the module fails and does nothing. Mutually exclusive with configuration_item_id. |
|
configuration_item_id string |
The configuration item (CI) or service ID that the change task applies to. Mutually exclusive with configuration_item. |
|
description string |
A detailed description of the task. This field has to be set either in the record or here. |
|
hold_reason string |
Reason why change task is on hold. Required if change task's on_hold value will be |
|
instance dictionary |
ServiceNow instance information. |
|
access_token string added in servicenow.itsm 2.3.0 |
Access token obtained via OAuth authentication. If not set, the value of the |
|
api_path string added in servicenow.itsm 2.4.0 |
Change the API endpoint of SNOW instance from default 'api/now'. Default: |
|
client_id string |
ID of the client application used for OAuth authentication. If not set, the value of the If provided, it requires client_secret. |
|
client_secret string |
Secret associated with client_id. Used for OAuth authentication. If not set, the value of the If provided, it requires client_id. |
|
custom_headers dictionary added in servicenow.itsm 2.4.0 |
A dictionary containing any extra headers which will be passed with the request. |
|
grant_type string added in servicenow.itsm 1.1.0 |
Grant type used for OAuth authentication. If not set, the value of the Since version 2.3.0, it no longer has a default value in the argument specifications. If not set by any means, the default value (that is, password) will be set internally to preserve backwards compatibility. Choices:
|
|
host string / required |
The ServiceNow host name. If not set, the value of the |
|
password string |
Password used for authentication. If not set, the value of the Required when using basic authentication or when grant_type=password. |
|
refresh_token string added in servicenow.itsm 1.1.0 |
Refresh token used for OAuth authentication. If not set, the value of the Required when grant_type=refresh_token. |
|
timeout float |
Timeout in seconds for the connection with the ServiceNow instance. If not set, the value of the |
|
username string |
Username used for authentication. If not set, the value of the Required when using basic authentication or when grant_type=password. |
|
validate_certs boolean added in servicenow.itsm 2.3.0 |
If host's certificate is validated or not. Choices:
|
|
number string |
Number of the record to operate on. Note that contrary to sys_id, number may not uniquely identify a record. |
|
on_hold boolean |
A change task cannot be put on hold when state is Provide an On hold reason if a change task is placed on hold. Choices:
|
|
other dictionary |
Optional remaining parameters. For more information on optional parameters, refer to the ServiceNow change task documentation at https://docs.servicenow.com/bundle/tokyo-it-service-management/page/product/change-management/task/create-a-change-task.html. |
|
planned_end_date string |
The date the change task is planned to be completed. |
|
planned_start_date string |
The date you plan to begin working on the task. |
|
short_description string |
A summary of the task. This field has to be set either in the record or here. |
|
state string |
The state of the change request task. Cannot be changed to Default choices are |
|
sys_id string |
Unique identifier of the record to operate on. |
|
type string |
The type of change task. Default workflow generates tasks in type If the task type is Choices:
|
servicenow.itsm.change_request_task_info
List ServiceNow change request tasks.
- name: Create a change task
servicenow.itsm.change_request_task:
configuration_item: Rogue Squadron Launcher
change_request_number: CHG0000001
type: planning
state: open
assigned_to: fred.luddy
assignment_group: robot.embedded
short_description: Implement collision avoidance
description: "Implement collision avoidance based on the newly installed TOF sensor arrays."
on_hold: true
hold_reason: "Waiting for a report from the hardware team"
planned_start_date: 2021-07-15 08:00:00
planned_end_date: 2021-07-21 16:00:00
other:
approval: approved
- name: Change state of the change task
servicenow.itsm.change_request_task:
state: in_progress
on_hold: false
number: CTASK0000001
- name: Close a change task
servicenow.itsm.change_request_task:
state: closed
close_code: "successful"
close_notes: "Closed"
number: CTASK0000001
- name: Delete a change task
servicenow.itsm.change_request_task:
state: absent
number: CTASK0000001
- Matej Pevec (@mysteriouswolf)
- Manca Bizjak (@mancabizjak)
- Miha Dolinar (@mdolin)
- Tadej Borovsak (@tadeboro)