Sha256: e0629e23b1e05d346380f1a40df0c2c167f472ff011d3461e2591382f0a07039

Contents?: true

Size: 1.3 KB

Versions: 112

Compression:

Stored size: 1.3 KB

Contents

<%#
name: Package Action - Ansible Default
job_category: Ansible Packages
description_format: 'Package %{name}: %{state}'
snippet: false
template_inputs:
- name: state
  required: true
  input_type: user
  description: Whether to install (present, latest), or remove (absent) a package.
  options: "present\r\nabsent\r\nlatest"
  advanced: false
- name: name
  required: true
  input_type: user
  description: "Package name, or package specifier with version, like name-1.0.\r\nBe
    aware that packages are not always named the same and this module will not 'translate'
    them per distro."
  advanced: false
- name: pre_script
  description: A script to run prior to the package action
  input_type: user
  required: false
  advanced: true
- name: post_script
  description: A script to run after the package action
  input_type: user
  required: false
  advanced: true
provider_type: Ansible
kind: job_template
model: JobTemplate
%>

# For Windows targets use the win_package module instead.
---
- hosts: all
  <%- if input('pre_script').present? -%>
  pre_tasks:
    - shell: "<%= input('pre_script') %>"
  <%- end -%>
  tasks:
    - package:
        name: <%= input('name') %>
        state: <%= input('state') %>
  <%- if input('post_script').present? -%>
  post_tasks:
    - shell: "<%= input('post_script') %>"
  <%- end -%>

Version data entries

112 entries across 112 versions & 1 rubygems

Version Path
foreman_ansible-13.0.7 app/views/foreman_ansible/job_templates/package_action_-_ansible_default.erb
foreman_ansible-13.0.5 app/views/foreman_ansible/job_templates/package_action_-_ansible_default.erb
foreman_ansible-13.0.4 app/views/foreman_ansible/job_templates/package_action_-_ansible_default.erb
foreman_ansible-13.0.3 app/views/foreman_ansible/job_templates/package_action_-_ansible_default.erb
foreman_ansible-13.0.2 app/views/foreman_ansible/job_templates/package_action_-_ansible_default.erb
foreman_ansible-13.0.1 app/views/foreman_ansible/job_templates/package_action_-_ansible_default.erb
foreman_ansible-13.0.0 app/views/foreman_ansible/job_templates/package_action_-_ansible_default.erb
foreman_ansible-12.0.7 app/views/foreman_ansible/job_templates/package_action_-_ansible_default.erb
foreman_ansible-10.4.4 app/views/foreman_ansible/job_templates/package_action_-_ansible_default.erb
foreman_ansible-7.1.8 app/views/foreman_ansible/job_templates/package_action_-_ansible_default.erb
foreman_ansible-12.0.6 app/views/foreman_ansible/job_templates/package_action_-_ansible_default.erb
foreman_ansible-12.0.5 app/views/foreman_ansible/job_templates/package_action_-_ansible_default.erb
foreman_ansible-10.4.3 app/views/foreman_ansible/job_templates/package_action_-_ansible_default.erb
foreman_ansible-12.0.4 app/views/foreman_ansible/job_templates/package_action_-_ansible_default.erb
foreman_ansible-10.4.2 app/views/foreman_ansible/job_templates/package_action_-_ansible_default.erb
foreman_ansible-12.0.3 app/views/foreman_ansible/job_templates/package_action_-_ansible_default.erb
foreman_ansible-12.0.2 app/views/foreman_ansible/job_templates/package_action_-_ansible_default.erb
foreman_ansible-12.0.1 app/views/foreman_ansible/job_templates/package_action_-_ansible_default.erb
foreman_ansible-12.0.0 app/views/foreman_ansible/job_templates/package_action_-_ansible_default.erb
foreman_ansible-11.2.1 app/views/foreman_ansible/job_templates/package_action_-_ansible_default.erb