diff --git a/.ansible-sign/sha256sum.txt b/.ansible-sign/sha256sum.txt index 4c4b5b4..8b6fa2b 100644 --- a/.ansible-sign/sha256sum.txt +++ b/.ansible-sign/sha256sum.txt @@ -99,6 +99,7 @@ b8bc0e6865c91d1d8cedf5bc9faa24782629806c15f99d0b24e3397ec294dcbb SNOWSetup/imag 8d64a90e1cf927f9adf8074d405a62ec50f4df417865706d1f4bc5ff5bdfeaa5 ServiceNowCR_and_approve.yml db0cf6bab374ea48077c3898aea1602a570541a49ed82797b7459c9ce9a9824c ServiceNowCR_canceled.yml 675d62c62ed528e495f8144290d181875521766c5cebb9661fc15552f1db1083 ServiceNowCR_closed.yml +253dfb0b9ff1fed18ce2a9c3bda1538b76ad98c7ac3e26ba9c65cc03e38b11d8 ServiceNowCR_closed_cr.yml 874cbddd96b4a29ba61d770da124c9db0ff1cc2736a1d802c9aeebbc7ffe45b1 ServiceNowCR_create.yml 115f1fb0355698a830ed0d070a0d404d299633261364f38e4dc329811ee3c375 ServiceNowCR_deleted.yml 97c831eff1abac9212abac46eb8922f93ecc8a3e092e0bd8545cb183fd30bff6 ServiceNowCR_implement.yml @@ -118,9 +119,10 @@ d8d966ccdf1e73840974c82ced8da6002e81ecd1c7a94250401f9d2441778dd0 ServiceNowtick f8f63300d2a511a2497b34ee831c4bec65d79f7780d2cc52989c977e4018698b roles/servicenow_catalog/tasks/main.yml ee48964111304a0741dcdad36426967a1784a923eba8dbea9622089072b7d52f roles/servicenow_catalog_create/tasks/main.yml dca8e6b77670bfa74e7302585937d64975a04bd09381c126d683d73fa7fd94c5 roles/servicenow_change_request/defaults/main.yml -1c8c3ab1069136518c7fc6ad8754ee63eb73935ad2a9aacfe0f0121e30bf0ed6 roles/servicenow_change_request/tasks/main.yml +d5a0d69f6df74093bf6017cdad91af19b6397523f7a3beb647afe09e783fba17 roles/servicenow_change_request/tasks/main.yml a3dc6c14a17f1d5b86f466016d23278f80b334c28b84a73d1671255af0cd57ac roles/servicenow_change_request/tasks/servicenow_canceled.yml 6e7ecd69274eacded20c661ff3b50567fbf1fe4b0c62138480815783f3566603 roles/servicenow_change_request/tasks/servicenow_close.yml +66c5294682f23256b05d468300152d8d8153714e9935dbc8f971ab61482ce979 roles/servicenow_change_request/tasks/servicenow_close_cr.yml 96fe8ffc8373291cdd82d3213a08eb1f73b4f09364b96db538941787a845a7ab roles/servicenow_change_request/tasks/servicenow_create.yml f24230fbcf3e3e8ead1a35ca1bc06ee6279cdd60180129a1d78e90dced09ce8f roles/servicenow_change_request/tasks/servicenow_deleted.yml 3841652179642981ddbf9d8ec47f2f8197702fb65e2fd4aab5714669c2ffcd52 roles/servicenow_change_request/tasks/servicenow_implement.yml diff --git a/.ansible-sign/sha256sum.txt.sig b/.ansible-sign/sha256sum.txt.sig index e3a6c3d..3e7fa43 100644 --- a/.ansible-sign/sha256sum.txt.sig +++ b/.ansible-sign/sha256sum.txt.sig @@ -1,14 +1,14 @@ -----BEGIN PGP SIGNATURE----- -iQGzBAABCAAdFiEE/bJvyFHKKJdaZDOLTiIiIXrUDNEFAma/W4wACgkQTiIiIXrU -DNHXbgv/dpErscFnoqYmnR47N6JFtRKn8BOiT4XsdqwZHjt3KhbqeFx2Q8xQkz3q -QOeoZiDCm1FubtJVa+Yar2Zd+nQPhvrMIgjPjeua/uPMp9OkCsb1EdOfLn4nj8Go -jQ2X8yJVuOV5DIpDulO+snHJvF+kVD0RFEOSXeaBakk9ATPfZ6EYyBYqwVqiw5Ux -TjiHZtuDndcD+9BqwQNQSf+VivEDWjt2xE3SpdpYppsPfc5PT/EwqJklbNzsI1t0 -/xvTMvEnkPJ4MEPR//cusHrkrkUUJENohTnMP8D14xwp6xhis7WrhHqDiLzlmBMN -msflcsPPAqLwC4LTzdlpYN6NlM4AoYMkOspsxzAG/kaPhoCTykX6VcjWC1hhN3Du -7DBGv0vGUzizsoVWLQVNXUl/NtS646EjjewTRSQjJo8ntIrDvAo9DiU4AOfjvBMy -dD41dDYMSzKr2QM6e8VSCaVEtc9u9f4CXnT7Vwua3x5tX0FcAk67wHh2LP8BnbGM -z0azrN0f -=AlQc +iQGzBAABCAAdFiEE/bJvyFHKKJdaZDOLTiIiIXrUDNEFAma/ZnwACgkQTiIiIXrU +DNG98gwAhs37qxh9ZLzEsmhZGp9Ek6EHRt2CkoX12mLmRhABce+ws3X7NYORygqI +/rreeEBGIrX3uy2oJCDCkmBGNgTKF4+N6U35Zstl6YKvNQGgXcEqUUo/UOiUMRng +Uiot0bYs+1lyX/8jMjgMPBFl5gDPd9G+X6nS3fF624B6U/MsQ8dwQQ6zl1fKuK1S +4IGX70eAGa62fgQUODVJ/bKm5ZQrpl5RY2VFIs9HpN2mqnzKBPSLF8KGnU3T2UEC +jMG8HEVpVUM4C1gLtEYPnFOesFRQscewJ8Kt6cTsUAHcvp6J6JBXFasjn433BXId +0KzyJzofPcYeG/8dJ5bLnv/DwwG2cteeBYuoTe4Wzss6h0VsJB1icBLMvVhhNp11 +e4fRscYseMsxPXSucrAr3T+m1grccZrgJiz3KlOS71BhUnGVV6rK/OItVA8hMIdy +C7l757GGpDIOaC5CMspJuRv1mIUDq/EMJrLQ3NeOavBd3YS4ourTnIE2UvSdKhC0 +jM9tkdSW +=CkTo -----END PGP SIGNATURE----- diff --git a/ServiceNowCR_closed_cr.yml b/ServiceNowCR_closed_cr.yml new file mode 100644 index 0000000..ed1cc7d --- /dev/null +++ b/ServiceNowCR_closed_cr.yml @@ -0,0 +1,11 @@ +--- +- name: Close a change request from Flow Designer Driven + hosts: localhost + gather_facts: false + connection: local + + vars: + servicenow_cr: close_cr + + roles: + - servicenow_change_request diff --git a/roles/servicenow_change_request/tasks/main.yml b/roles/servicenow_change_request/tasks/main.yml index 68d7edf..cfd4833 100644 --- a/roles/servicenow_change_request/tasks/main.yml +++ b/roles/servicenow_change_request/tasks/main.yml @@ -16,6 +16,11 @@ - servicenow_cr == "close" - request is defined +- name: Close CR + ansible.builtin.include_tasks: servicenow_close_cr.yml + when: + - servicenow_cr == "close_cr" + - name: Cancel CR ansible.builtin.include_tasks: servicenow_canceled.yml when: diff --git a/roles/servicenow_change_request/tasks/servicenow_close_cr.yml b/roles/servicenow_change_request/tasks/servicenow_close_cr.yml new file mode 100644 index 0000000..df43d6e --- /dev/null +++ b/roles/servicenow_change_request/tasks/servicenow_close_cr.yml @@ -0,0 +1,14 @@ +--- +- name: Place a change request in ServiceNow in Review + servicenow.itsm.change_request: + state: review + number: "{{ change_request_number }}" + delegate_to: localhost + +- name: Close a change request + servicenow.itsm.change_request: + state: closed + number: "{{ change_request_number }}" + close_code: "{{ close_code }}" + close_notes: "{{ close_notes }}" + delegate_to: localhost