Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #37706 - Add a template that enables download and run of a script #907

Merged

Conversation

ShimShtein
Copy link
Member

The main idea is to execute scripts from the Foreman server, similar to theforeman/foreman#10208.

required: true
%>

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

Choose a reason for hiding this comment

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

Just to be sure, I'd quote the URL because it may contain &

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

.gitignore Outdated
@@ -15,3 +15,4 @@ Gemfile.lock
node_modules/
package-lock.json
coverage/
public/
Copy link
Member

Choose a reason for hiding this comment

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

This looks unrelated

Copy link
Member Author

Choose a reason for hiding this comment

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

It's still needed, so split it to a separate PR.

@ShimShtein
Copy link
Member Author

Added quotes.

@ShimShtein
Copy link
Member Author

@ekohl What do you think, would it be OK, or do we want to be more specific and just reuse the snippet from Foreman?

Copy link
Contributor

@stejskalleos stejskalleos left a comment

Choose a reason for hiding this comment

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

🍏 LGTM, works as expected

@ofedoren
Copy link
Member

ofedoren commented Aug 1, 2024

@ShimShtein, could you please create a RM ticket and attach it to the PR?

@ShimShtein ShimShtein force-pushed the add_foreman_script_execution_template branch from 039d0fb to ec63276 Compare August 1, 2024 10:45
The main idea is to execute scripts from the Foreman server,
similar to theforeman/foreman#10208.
@ShimShtein ShimShtein force-pushed the add_foreman_script_execution_template branch from ec63276 to 2d85464 Compare August 1, 2024 10:52
@ShimShtein
Copy link
Member Author

@ofedoren Done.

@ofedoren ofedoren changed the title Add a template that enables download and run of a script Fixes #37706 - Add a template that enables download and run of a script Aug 1, 2024
Copy link
Member

@ofedoren ofedoren left a comment

Choose a reason for hiding this comment

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

Thanks, all, merging.

@ofedoren ofedoren merged commit 37a106c into theforeman:master Aug 1, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants