Skip to content

Commit

Permalink
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 committed Jun 26, 2024
1 parent 01d063b commit 039d0fb
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 039d0fb

Please sign in to comment.