Sha256: ea803ac666cbbaccbcf7eb0131ab85eac69fb0e43a0db6a3e8cbad0a4ab46e72

Contents?: true

Size: 637 Bytes

Versions: 5

Compression:

Stored size: 637 Bytes

Contents

<%#
name: Download and execute a script
job_category: Ansible Commands
description_format: Download script from %{url} and execute it
snippet: false
template_inputs:
- name: url
  required: true
  input_type: user
  description: "URL of the script to download e.g: http://example.com/unattended/anonymous/my_script"
  advanced: false
provider_type: Ansible
kind: job_template
model: JobTemplate
%>

---
- hosts: all
  tasks:
    - uri:
        url: <%= input("url") %>
        return_content: true
      register: script_response
    - shell:
        cmd: |
          {{script_response.content}}
      register: out
    - debug: var=out

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
foreman_ansible-14.2.3 app/views/foreman_ansible/job_templates/download_and_execute_script.erb
foreman_ansible-15.0.0 app/views/foreman_ansible/job_templates/download_and_execute_script.erb
foreman_ansible-14.2.2 app/views/foreman_ansible/job_templates/download_and_execute_script.erb
foreman_ansible-14.2.1 app/views/foreman_ansible/job_templates/download_and_execute_script.erb
foreman_ansible-14.2.0 app/views/foreman_ansible/job_templates/download_and_execute_script.erb