Skip to content

Commit

Permalink
improved rulebook and grammar
Browse files Browse the repository at this point in the history
  • Loading branch information
adworjan committed Mar 5, 2024
1 parent ab7a976 commit 2ef1fd9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .ansible-sign/sha256sum.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ b64a9ce7ade9b8fae7bda827f7a8d179809a8df065c8bafc1af07ae827ffb2aa SNOWSetup/imag
3b6b1d02322d2b0435b86bec366c94c6fe928ab84f0d2b881cf102021c44dddc SNOWSetup/images/workflow_start.jpg
cb3a760e0f134314711929e87e54b3a46d3d4898f0baa2d641000ee1e3b63708 SNOWSetup/images/write_scope.png
b8bc0e6865c91d1d8cedf5bc9faa24782629806c15f99d0b24e3397ec294dcbb SNOWSetup/images/write_scope_deets.png
f58b44080c5457f9dd4e58ab0a3141ec748dbe041020925b3cc8d87ddf3962e4 SNOWSetup/readme.md
c605924e1a9368a1e4c2f35e5d950d583d3629bbbfc65c37f1f661ae69d7a93b SNOWSetup/readme.md
8d64a90e1cf927f9adf8074d405a62ec50f4df417865706d1f4bc5ff5bdfeaa5 ServiceNowCR_and_approve.yml
db0cf6bab374ea48077c3898aea1602a570541a49ed82797b7459c9ce9a9824c ServiceNowCR_canceled.yml
675d62c62ed528e495f8144290d181875521766c5cebb9661fc15552f1db1083 ServiceNowCR_closed.yml
Expand Down
22 changes: 11 additions & 11 deletions .ansible-sign/sha256sum.txt.sig
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
-----BEGIN PGP SIGNATURE-----

iQGzBAABCAAdFiEE/bJvyFHKKJdaZDOLTiIiIXrUDNEFAmXnZG8ACgkQTiIiIXrU
DNGxgQv/WOM8eMRmSRvY8yvC+GFraMmjth/OnrVqYPJLielTY28S+v7xJZroO3qy
ofp+hupW6GHh9SuOCr0XaUQNmJjIFruGIFQVBShrTcHSWULuW3hQl4qZDlfwHkuW
ndX2m8rB3Wp3gBkBqplVeTsmyGzj/UV/b/pO21Lntq8X7zTiFsBQ56u6IxknC2eV
j4OSjtf4n4ef5kNQWt51y7gXlpjRyaA0tnCRZ3d9LgJhRmr0bJUdOIQ9WEE8ujON
4UbKCws7z/tRhNnAJS1rUAW438/qrSjER3fdTRwC2+pdhJHbgEcSVUguUIdNCu2C
+qSo54gFkBjU85ago1s9gwUC0YSKykjlIfdG/EJb8UQkVlv7QwJmT+Y6N44Itzom
j5Vm4YIu3w8qqEalJhtKzTXksnS2/UH/HyD4NxD8dnwhhEWRJHrMgSlz2tcdUi4y
Cwux5G+hNDEFk4d2gaMNupJfH4F0TJk8I6wvOwnbdzeZl2rMlurgCB2awM9pNkKV
Qgj4H+bb
=JjEO
iQGzBAABCAAdFiEE/bJvyFHKKJdaZDOLTiIiIXrUDNEFAmXnh1cACgkQTiIiIXrU
DNEscQwAgRQuXtcDI4IHe7vz6RR3mnwjgZG44GIZVGc0+V1ds1JWOYXalLgHySBJ
mxFlqhXDMlWD7mC5v+JB3rA8ZUaVoAfXLPA7J12F+YSEQKGev1U/0W5Cko2SkWLb
krNjXbki5vLdmuz0FkQ99AzEgy0Wo3JmmHqW38XIVqaPKHzS30FWiYZPNoMom30x
o+XQ4wOGk4gXntM2OdX8YmWkNtjk8/cQolP84ZY8GyUM4w9PR8OfKuMtjk4eggEg
CZRbYbjwsuPxaFcC9bssGHBausNnQnhhAehaFVsF2G5f1lGxQeZNXBS0K6TBhi7f
lLtMd0YboNahNIlW9Q3PGZ6oqBAEiwza3TrTSpRkupLVd/sqv8s88xvpew2lW380
jcRt5Qvb7H/s6+3T9DwXuvwgRvrYaBA3jbV3HsCUfmPeqL4PB3OOpFxy+5tlY1TD
2QZ0fREJFZ+7ZUjGK9m93Rio2bcL+1BfaJPFWAZ/Wt/HImrPl66ajsJ9XPzX9nkj
xClgRzBs
=h0BX
-----END PGP SIGNATURE-----
17 changes: 9 additions & 8 deletions SNOWSetup/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ Now we will create a basic rulebook in order to display the information sent by
action:
debug:
```
A more detailed rulebook example including a job template
A more detailed rulebook example including a Workflow Job Template
```
---
- name: Listen for events on a webhook from ServiceNow
Expand All @@ -591,14 +591,15 @@ A more detailed rulebook example including a job template
rules:
- name: Respond to Node Exporter Down Incident
condition: event.payload.short_description == "Prometheus Node Exporter is down" event.payload.token == "{{ servicenow_token }}"
condition: event.payload.short_description == "Prometheus Node Exporter is down" and event.payload.token == "{{ servicenow_token }}"
action:
run_job_template:
name: "Start Prometheus Node Exporter"
organization: "Infrastructure"
run_workflow_template:
name: "Automated Response Node Exporter Down"
organization: "Security"
job_args:
extra_vars:
vm_name: "{{ event.payload.u_vm_name }}"
ticket_number: "{{ event.payload.number }}"
```

#### 4)
Expand All @@ -614,9 +615,9 @@ On the new page, click **History** and ensure the rulebook is successfully runni

#### 5)
Now we will configure the Event-Driven Ansible Notification as the ServiceNow user we just assigned permissions. Navigate to the **All** menu and select **Event-Driven Ansible Notifications -> Properties**. In the Webhook Configurations section fill in a Webhook URL and a
Webhook authorization token if desired. The webhook URL should your EDA Controller server plus the port your rulebook webhook will be listening on, for example **http://eda.shadowman.dev:5003/endpoint**
Webhook authorization token if desired. The webhook URL should the FQDN of your Event-Driven Ansible Controller server plus the port your rulebook webhook will be listening on, for example **http://eda.shadowman.dev:5003/endpoint**

No MID Server is needed if the webhook url is accessible directly from the running servicenow instance. Otherwise fill in a proper MID Server name. The machine listening to the webhook requests must be reachable by the MID Server. To validate the MID Server use the **All** menu and select **MID Servers -> Servers**. The selected MID Server must appear on the server list and its Status field must be Up and its Validated field must be Yes.
No MID Server is needed if the Webhook URL is accessible directly from the running ServiceNow instance. Otherwise, fill in a proper MID Server name. Your Event-Driven Ansible Controller server listening to the webhook requests must be reachable by the MID Server. To validate the MID Server use the **All** menu and select **MID Servers -> Servers**. The selected MID Server must appear on the server list and its Status field must be Up and its Validated field must be Yes.

Click the **Test Connectivity** button to test the connection from the running servicenow instance to the configured webhook. If successful, it will display “Webhook Connection OK”.

Expand All @@ -628,7 +629,7 @@ Finally click the **OK** button to persist all the settings. These settings can
<img src="images/eda_configuration.png" alt="Event-Driven Ansible Configuration" title="Event-Driven Ansible Configuration" width="1000" />

#### 6)
To test the configuration and see the output provided by ServiceNow, I will use Incidents. For this test, navigate to the **All** menu and select **Event-Driven Ansible Notifications -> Properties**. Check **When Created** for the Incident table if you haven't already. Click **OK** to confirm the changes. Create a new Incident, navigate to the **All** menu and select **Incident -> Create New**. Fill in the incident information (at a minimum you need Caller and Short description) and click Submit.
To test the configuration and see the output provided by ServiceNow, you can easily create a test Incident. For this test, navigate to the **All** menu and select **Event-Driven Ansible Notifications -> Properties**. Check **When Created** for the Incident table if you haven't already. Click **OK** to confirm the changes. Create a new Incident, navigate to the **All** menu and select **Incident -> Create New**. Fill in the incident information (at a minimum you need Caller and Short description) and click Submit.

Navigate to Event-Driven Ansible Controller and select **Rule Audit**. You should see a new Rule that has been triggered. Select the name. Go to **Events** and click on **ansible.eda.webhook** to see the full json payload that was received by EDA. This is what you can use to create the conditions for your rulebook in the future. You can now utilize the Event-Driven Ansible Notification Service.

Expand Down

0 comments on commit 2ef1fd9

Please sign in to comment.