Sha256: 2d2d8e44006e64c7221586bdb544f8c8ae5de0ed629eb15e15f1602d4a6f7ffa
Contents?: true
Size: 732 Bytes
Versions: 16
Compression:
Stored size: 732 Bytes
Contents
# frozen_string_literal: true module ForemanAnsible # Chained methods to extend the hosts menu with Ansible actions module HostsHelperExtensions extend ActiveSupport::Concern module Overrides def multiple_actions actions = super if User.current.can?(:create_job_invocations) && User.current.can?(:play_roles_on_host) actions += [[_('Play Ansible roles'), multiple_play_roles_hosts_path, false]] end actions end end included do prepend Overrides end def ansible_roles_present?(host) host.ansible_roles.present? || host.inherited_ansible_roles.present? end end end
Version data entries
16 entries across 16 versions & 1 rubygems