Skip to content

Commit

Permalink
Fixes #37706 - Add a template that enables download and run of a script
Browse files Browse the repository at this point in the history
The main idea is to execute scripts from the Foreman server,
similar to theforeman/foreman#10208.
  • Loading branch information
ShimShtein authored and ofedoren committed Aug 1, 2024
1 parent 6ad7678 commit 37a106c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions app/views/templates/script/run_downloaded_script.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<%#
kind: job_template
name: Download and run a script
model: JobTemplate
job_category: Commands
description_format: "Download the script from %{url} and run it locally"
provider_type: script
template_inputs:
- name: url
description: URL of the script to download and execute
input_type: user
required: true
%>

set -o pipefail && curl -sS '<%= input("url") %>' | bash

0 comments on commit 37a106c

Please sign in to comment.