Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions guides/common/assembly_using-foreman-webhooks.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ include::modules/proc_creating-a-webhook.adoc[leveloffset=+1]

include::modules/ref_webhooks-available-events.adoc[leveloffset=+1]

ifndef::containerized[]
include::modules/con_shellhooks-plugin-for-smartproxy.adoc[leveloffset=+1]

include::modules/proc_installing-shellhooks-plugin.adoc[leveloffset=+1]
Expand All @@ -23,6 +24,7 @@ include::modules/proc_passing-arguments-to-shellhook-script-using-webhooks.adoc[
include::modules/proc_passing-arguments-to-shellhook-script-using-curl.adoc[leveloffset=+1]

include::modules/proc_creating-a-shellhook-to-print-arguments.adoc[leveloffset=+1]
endif::[]

ifdef::parent-context[:context: {parent-context}]
ifndef::parent-context[:!context:]
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ The application sending the request does not wait for the response, or ignores i
Because webhooks use HTTP, no new infrastructure needs be added to existing web services.
Webhooks are useful where the action you want to perform in the external system can be achieved through its API.

ifndef::containerized[]
Where it is necessary to run additional commands or edit files, the shellhooks plugin for {SmartProxies} is available.
The shellhooks plugin enables you to define a shell script on the {SmartProxy} that can be executed through the API.

You can use webhooks successfully without installing the shellhooks plugin.
endif::[]

Payload of a webhook is created from webhook templates.
Webhook templates use the same ERB syntax as Provisioning templates.
Expand Down
2 changes: 2 additions & 0 deletions guides/common/modules/proc_creating-a-webhook.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@
When creating a webhook in the {ProjectWebUI}, you can customize events, payloads, HTTP authentication, content type, and headers.

ifndef::foreman-deb,orcharhino[]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On a side note, why is this hidden for orcharhino? Doesn't orcharhino still run on selinux-enabled el*?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hid this in the past because in orcharhino downstream, we use a different installation guide -> I could not get the link to work. Thanks for the hint, I will look into this eventually. For now, it could stay as is.

ifndef::containerized[]
[NOTE]
====
When configuring webhooks with endpoints with non-standard HTTP or HTTPS ports, an SELinux port must be assigned, see {InstallingServerDocURL}configuring-selinux-to-ensure-access-on-custom-ports_{project-context}[Configuring SELinux to ensure access to {Project} on custom ports] in _{InstallingServerDocTitle}_.
====
endif::[]
endif::[]

.Procedure
. In the {ProjectWebUI}, navigate to *Administer* > *Webhook* > *Webhooks*.

Check failure on line 19 in guides/common/modules/proc_creating-a-webhook.adoc

View workflow job for this annotation

GitHub Actions / lint style

[vale] reported by reviewdog 🐶 [foreman-documentation.ProcedureStepLimit] Procedure contains more than 10 steps. Split it into multiple procedures or leverage substeps to group related steps. If the procedure contains conditionals, review the preview to ensure all built targets comply with the limit of 10 steps. Raw Output: {"message": "[foreman-documentation.ProcedureStepLimit] Procedure contains more than 10 steps. Split it into multiple procedures or leverage substeps to group related steps. If the procedure contains conditionals, review the preview to ensure all built targets comply with the limit of 10 steps.", "location": {"path": "guides/common/modules/proc_creating-a-webhook.adoc", "range": {"start": {"line": 19, "column": 1}}}, "severity": "ERROR"}
. Click *Create new*.
. From the *Subscribe to* list, select an event.
. Enter a *Name* for your webhook.
Expand Down
10 changes: 10 additions & 0 deletions guides/common/modules/proc_installing-webhooks-plugin.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ Use the following procedure to install the webhooks plugin.
Then, you can configure {ProjectServer} to send webhook requests.

.Procedure
ifdef::containerized[]
* On your {ProjectServer}, install the webhooks plugin:
+
[options="nowrap" subs="+quotes,attributes"]
----
# {foremanctl} --add-feature webhooks
----
endif::[]
ifndef::containerized[]
. On your {ProjectServer}, install the webhooks plugin:
+
[options="nowrap" subs="+quotes,attributes"]
Expand All @@ -20,3 +29,4 @@ Then, you can configure {ProjectServer} to send webhook requests.
----
# {foreman-installer} --enable-foreman-cli-webhooks
----
endif::[]
4 changes: 4 additions & 0 deletions guides/common/modules/ref_webhooks-available-events.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,26 @@
|Actions Remote Execution Run Host Job Katello Group Update Succeeded |Update package group using the Katello interface.|Actions::RemoteExecution::RunHostJob
|Actions Remote Execution Run Host Job Katello Package Update Succeeded |Update package using the Katello interface.|Actions::RemoteExecution::RunHostJob
endif::[]
ifndef::containerized[]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: openscap and ansible are not in yet

|Actions Remote Execution Run Host Job Foreman OpenSCAP Run Scans Succeeded |Run OpenSCAP scan.|Actions::RemoteExecution::RunHostJob

Check failure on line 35 in guides/common/modules/ref_webhooks-available-events.adoc

View workflow job for this annotation

GitHub Actions / lint style

[vale] reported by reviewdog 🐶 [foreman-documentation.Capitalization] Use 'remote execution' instead of 'Remote Execution' unless you are using the term in a context that requires different capitalization. For example, different capitalization might be required in Web UI buttons, settings, or templates. Raw Output: {"message": "[foreman-documentation.Capitalization] Use 'remote execution' instead of 'Remote Execution' unless you are using the term in a context that requires different capitalization. For example, different capitalization might be required in Web UI buttons, settings, or templates.", "location": {"path": "guides/common/modules/ref_webhooks-available-events.adoc", "range": {"start": {"line": 35, "column": 10}}}, "severity": "ERROR"}
|Actions Remote Execution Run Host Job Ansible Run Host Succeeded |Runs an Ansible Playbook containing all the roles defined for a host.|Actions::RemoteExecution::RunHostJob

Check failure on line 36 in guides/common/modules/ref_webhooks-available-events.adoc

View workflow job for this annotation

GitHub Actions / lint style

[vale] reported by reviewdog 🐶 [foreman-documentation.Capitalization] Use 'remote execution' instead of 'Remote Execution' unless you are using the term in a context that requires different capitalization. For example, different capitalization might be required in Web UI buttons, settings, or templates. Raw Output: {"message": "[foreman-documentation.Capitalization] Use 'remote execution' instead of 'Remote Execution' unless you are using the term in a context that requires different capitalization. For example, different capitalization might be required in Web UI buttons, settings, or templates.", "location": {"path": "guides/common/modules/ref_webhooks-available-events.adoc", "range": {"start": {"line": 36, "column": 10}}}, "severity": "ERROR"}
|Actions Remote Execution Run Host Job Ansible Run {SmartProxy} Upgrade Succeeded |Upgrade {SmartProxies} on given {SmartProxyServers}.|Actions::RemoteExecution::RunHostJob
|Actions Remote Execution Run Host Job Ansible Configure Cloud Connector Succeeded |Configure Cloud Connector on given hosts.|Actions::RemoteExecution::RunHostJob
ifdef::satellite[]
|Actions Remote Execution Run Host Job Ansible Run {Insights} Plan Succeeded |Runs a given maintenance plan from Red Hat Access {Insights} given an ID.|Actions::RemoteExecution::RunHostJob
endif::[]
|Actions Remote Execution Run Host Job Ansible Run Playbook Succeeded |Run an Ansible Playbook against given hosts.|Actions::RemoteExecution::RunHostJob

Check failure on line 42 in guides/common/modules/ref_webhooks-available-events.adoc

View workflow job for this annotation

GitHub Actions / lint style

[vale] reported by reviewdog 🐶 [foreman-documentation.Capitalization] Use 'remote execution' instead of 'Remote Execution' unless you are using the term in a context that requires different capitalization. For example, different capitalization might be required in Web UI buttons, settings, or templates. Raw Output: {"message": "[foreman-documentation.Capitalization] Use 'remote execution' instead of 'Remote Execution' unless you are using the term in a context that requires different capitalization. For example, different capitalization might be required in Web UI buttons, settings, or templates.", "location": {"path": "guides/common/modules/ref_webhooks-available-events.adoc", "range": {"start": {"line": 42, "column": 10}}}, "severity": "ERROR"}
|Actions Remote Execution Run Host Job Ansible Enable Web Console Succeeded |Run an Ansible Playbook to enable the web console on given hosts.|Actions::RemoteExecution::RunHostJob

Check failure on line 43 in guides/common/modules/ref_webhooks-available-events.adoc

View workflow job for this annotation

GitHub Actions / lint style

[vale] reported by reviewdog 🐶 [foreman-documentation.Capitalization] Use 'remote execution' instead of 'Remote Execution' unless you are using the term in a context that requires different capitalization. For example, different capitalization might be required in Web UI buttons, settings, or templates. Raw Output: {"message": "[foreman-documentation.Capitalization] Use 'remote execution' instead of 'Remote Execution' unless you are using the term in a context that requires different capitalization. For example, different capitalization might be required in Web UI buttons, settings, or templates.", "location": {"path": "guides/common/modules/ref_webhooks-available-events.adoc", "range": {"start": {"line": 43, "column": 10}}}, "severity": "ERROR"}
endif::[]
|Actions Remote Execution Run Host Job Puppet Run Host Succeeded |Perform a single Puppet run.|Actions::RemoteExecution::RunHostJob

Check failure on line 45 in guides/common/modules/ref_webhooks-available-events.adoc

View workflow job for this annotation

GitHub Actions / lint style

[vale] reported by reviewdog 🐶 [foreman-documentation.Capitalization] Use 'remote execution' instead of 'Remote Execution' unless you are using the term in a context that requires different capitalization. For example, different capitalization might be required in Web UI buttons, settings, or templates. Raw Output: {"message": "[foreman-documentation.Capitalization] Use 'remote execution' instead of 'Remote Execution' unless you are using the term in a context that requires different capitalization. For example, different capitalization might be required in Web UI buttons, settings, or templates.", "location": {"path": "guides/common/modules/ref_webhooks-available-events.adoc", "range": {"start": {"line": 45, "column": 10}}}, "severity": "ERROR"}
ifdef::katello,orcharhino,satellite[]
|Actions Remote Execution Run Host Job Katello Module Stream Action Succeeded |Perform a module stream action using the Katello interface.|Actions::RemoteExecution::RunHostJob
endif::[]
ifndef::containerized[]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: leapp is not in yet

|Actions Remote Execution Run Host Job Leapp Pre-upgrade Succeeded |Upgradeability check for RHEL 7 host.|Actions::RemoteExecution::RunHostJob

Check failure on line 50 in guides/common/modules/ref_webhooks-available-events.adoc

View workflow job for this annotation

GitHub Actions / lint style

[vale] reported by reviewdog 🐶 [foreman-documentation.Capitalization] Use 'remote execution' instead of 'Remote Execution' unless you are using the term in a context that requires different capitalization. For example, different capitalization might be required in Web UI buttons, settings, or templates. Raw Output: {"message": "[foreman-documentation.Capitalization] Use 'remote execution' instead of 'Remote Execution' unless you are using the term in a context that requires different capitalization. For example, different capitalization might be required in Web UI buttons, settings, or templates.", "location": {"path": "guides/common/modules/ref_webhooks-available-events.adoc", "range": {"start": {"line": 50, "column": 10}}}, "severity": "ERROR"}
|Actions Remote Execution Run Host Job Leapp Remediation Plan Succeeded |Run Remediation plan with Leapp.|Actions::RemoteExecution::RunHostJob

Check failure on line 51 in guides/common/modules/ref_webhooks-available-events.adoc

View workflow job for this annotation

GitHub Actions / lint style

[vale] reported by reviewdog 🐶 [foreman-documentation.Capitalization] Use 'remote execution' instead of 'Remote Execution' unless you are using the term in a context that requires different capitalization. For example, different capitalization might be required in Web UI buttons, settings, or templates. Raw Output: {"message": "[foreman-documentation.Capitalization] Use 'remote execution' instead of 'Remote Execution' unless you are using the term in a context that requires different capitalization. For example, different capitalization might be required in Web UI buttons, settings, or templates.", "location": {"path": "guides/common/modules/ref_webhooks-available-events.adoc", "range": {"start": {"line": 51, "column": 10}}}, "severity": "ERROR"}
|Actions Remote Execution Run Host Job Leapp Upgrade Succeeded |Run Leapp upgrade job for RHEL 7 host.|Actions::RemoteExecution::RunHostJob

Check failure on line 52 in guides/common/modules/ref_webhooks-available-events.adoc

View workflow job for this annotation

GitHub Actions / lint style

[vale] reported by reviewdog 🐶 [foreman-documentation.Capitalization] Use 'remote execution' instead of 'Remote Execution' unless you are using the term in a context that requires different capitalization. For example, different capitalization might be required in Web UI buttons, settings, or templates. Raw Output: {"message": "[foreman-documentation.Capitalization] Use 'remote execution' instead of 'Remote Execution' unless you are using the term in a context that requires different capitalization. For example, different capitalization might be required in Web UI buttons, settings, or templates.", "location": {"path": "guides/common/modules/ref_webhooks-available-events.adoc", "range": {"start": {"line": 52, "column": 10}}}, "severity": "ERROR"}
endif::[]
|Build Entered |A host entered the build mode.|Custom event: `@payload[:id]` (host id), `@payload[:hostname]` (host name).
|Build Exited |A host build mode was canceled, either it was successfully provisioned or the user canceled the build manually.|Custom event: `@payload[:id]` (host id), `@payload[:hostname]` (host name).
|Config Report Created/Updated/Destroyed |Common database operations on a configuration report.|ConfigReport
Expand Down
2 changes: 2 additions & 0 deletions guides/doc-Administering_Project/master.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,11 @@ include::common/assembly_monitoring-project-resources.adoc[leveloffset=+1]
ifndef::satellite[]
include::common/assembly_limiting-host-resources.adoc[leveloffset=+1]
endif::[]
endif::[]

include::common/assembly_using-foreman-webhooks.adoc[leveloffset=+1]

ifndef::satellite[]
include::common/assembly_working-efficiently-with-web-ui.adoc[leveloffset=+1]

[appendix]
Expand Down
Loading