Sha256: ce6c44a056a398b7b4d081a57eeeacf149ccc78fbd407f8318ef15491ca0392d

Contents?: true

Size: 596 Bytes

Versions: 35

Compression:

Stored size: 596 Bytes

Contents

<%#
name: Power Action - Ansible Default
job_category: Ansible Power
description_format: "%{action} host"
snippet: false
template_inputs:
- name: action
  required: true
  input_type: user
  description: Action to perform on the service
  options: "restart\r\nshutdown"
  advanced: false
provider_type: Ansible
kind: job_template
model: JobTemplate
%>

---
- hosts: all
  tasks:
    - command: |
        echo <%= input('action') %> host && sleep 3
        <%= case input('action')
          when 'restart'
            'shutdown -r +1'
          else
            'shutdown -h +1'
          end %>

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
foreman_ansible-5.1.0 app/views/foreman_ansible/job_templates/power_action_-_ansible_default.erb
foreman_ansible-4.0.3.5 app/views/foreman_ansible/job_templates/power_action_-_ansible_default.erb
foreman_ansible-4.0.3.4 app/views/foreman_ansible/job_templates/power_action_-_ansible_default.erb
foreman_ansible-4.0.3.3 app/views/foreman_ansible/job_templates/power_action_-_ansible_default.erb
foreman_ansible-4.0.3.2 app/views/foreman_ansible/job_templates/power_action_-_ansible_default.erb
foreman_ansible-5.0.1 app/views/foreman_ansible/job_templates/power_action_-_ansible_default.erb
foreman_ansible-4.0.5 app/views/foreman_ansible/job_templates/power_action_-_ansible_default.erb
foreman_ansible-4.0.3.1 app/views/foreman_ansible/job_templates/power_action_-_ansible_default.erb
foreman_ansible-4.0.4 app/views/foreman_ansible/job_templates/power_action_-_ansible_default.erb
foreman_ansible-5.0.0 app/views/foreman_ansible/job_templates/power_action_-_ansible_default.erb
foreman_ansible-4.0.3 app/views/foreman_ansible/job_templates/power_action_-_ansible_default.erb
foreman_ansible-4.0.2 app/views/foreman_ansible/job_templates/power_action_-_ansible_default.erb
foreman_ansible-4.0.0 app/views/foreman_ansible/job_templates/power_action_-_ansible_default.erb
foreman_ansible-3.0.9 app/views/foreman_ansible/job_templates/power_action_-_ansible_default.erb
foreman_ansible-3.0.8 app/views/foreman_ansible/job_templates/power_action_-_ansible_default.erb
foreman_ansible-3.0.7 app/views/foreman_ansible/job_templates/power_action_-_ansible_default.erb
foreman_ansible-3.0.6 app/views/foreman_ansible/job_templates/power_action_-_ansible_default.erb
foreman_ansible-3.0.5 app/views/foreman_ansible/job_templates/power_action_-_ansible_default.erb
foreman_ansible-3.0.4 app/views/foreman_ansible/job_templates/power_action_-_ansible_default.erb
foreman_ansible-3.0.3 app/views/foreman_ansible/job_templates/power_action_-_ansible_default.erb