Sha256: f7907a5204148cbecbfcfb9029d28f458a9684c936b3486e5339b57818493b69
Contents?: true
Size: 735 Bytes
Versions: 42
Compression:
Stored size: 735 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 += [[_('Run all 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
42 entries across 42 versions & 1 rubygems