Sha256: 15f9c218d71779d8884bda0069e9fb9ce84981d7b926692ee389d5ac13c4a39d

Contents?: true

Size: 1.32 KB

Versions: 109

Compression:

Stored size: 1.32 KB

Contents

<%#
kind: job_template
name: Module Action - Ansible Default
model: JobTemplate
job_category: Ansible Modules
description_format: "Module %{action} %{module_spec}"
provider_type: Ansible
template_inputs:
- name: pre_script
  description: A script to run prior to the module action
  input_type: user
  required: false
  advanced: true
- name: action
  description: 'The module action enable, install etc'
  input_type: user
  required: true
  options: "\nlist\ninfo\nenable\ndisable\ninstall\nupdate\nremove\nprovides\nreset"
- name: module_spec
  description: The module specification. module:stream/profile
  input_type: user
  required: false
- name: options
  description: Other optional flags for the action
  input_type: user
  required: false
- name: post_script
  description: A script to run after the module action
  input_type: user
  required: false
  advanced: true
%>

<% command = "dnf -y module #{input(:action)} #{input(:module_spec)} #{input(:options)}" %>

---
- hosts: all
  <%- if input('pre_script').present? -%>
  pre_tasks:
    - shell: "<%= input('pre_script') %>"
  <%- end -%>
  tasks:
    - shell: |
<%=     indent(8) { command } %>
      register: out
      args:
        warn: false
    - debug: var=out
  <%- if input('post_script').present? -%>
  post_tasks:
    - shell: "<%= input('post_script') %>"
  <%- end -%>

Version data entries

109 entries across 109 versions & 1 rubygems

Version Path
foreman_ansible-15.0.2 app/views/foreman_ansible/job_templates/module_action_-_ansible_default.erb
foreman_ansible-15.0.1 app/views/foreman_ansible/job_templates/module_action_-_ansible_default.erb
foreman_ansible-15.0.0 app/views/foreman_ansible/job_templates/module_action_-_ansible_default.erb
foreman_ansible-14.2.2 app/views/foreman_ansible/job_templates/module_action_-_ansible_default.erb
foreman_ansible-14.2.1 app/views/foreman_ansible/job_templates/module_action_-_ansible_default.erb
foreman_ansible-13.0.7 app/views/foreman_ansible/job_templates/module_action_-_ansible_default.erb
foreman_ansible-14.2.0 app/views/foreman_ansible/job_templates/module_action_-_ansible_default.erb
foreman_ansible-14.1.1 app/views/foreman_ansible/job_templates/module_action_-_ansible_default.erb
foreman_ansible-14.1.0 app/views/foreman_ansible/job_templates/module_action_-_ansible_default.erb
foreman_ansible-13.0.5 app/views/foreman_ansible/job_templates/module_action_-_ansible_default.erb
foreman_ansible-14.0.0 app/views/foreman_ansible/job_templates/module_action_-_ansible_default.erb
foreman_ansible-13.0.4 app/views/foreman_ansible/job_templates/module_action_-_ansible_default.erb
foreman_ansible-13.0.3 app/views/foreman_ansible/job_templates/module_action_-_ansible_default.erb
foreman_ansible-13.0.2 app/views/foreman_ansible/job_templates/module_action_-_ansible_default.erb
foreman_ansible-13.0.1 app/views/foreman_ansible/job_templates/module_action_-_ansible_default.erb
foreman_ansible-13.0.0 app/views/foreman_ansible/job_templates/module_action_-_ansible_default.erb
foreman_ansible-12.0.7 app/views/foreman_ansible/job_templates/module_action_-_ansible_default.erb
foreman_ansible-10.4.4 app/views/foreman_ansible/job_templates/module_action_-_ansible_default.erb
foreman_ansible-7.1.8 app/views/foreman_ansible/job_templates/module_action_-_ansible_default.erb
foreman_ansible-12.0.6 app/views/foreman_ansible/job_templates/module_action_-_ansible_default.erb