Sha256: c2c02938b21c56cfa7a69be57ab94759555bac75d8d7879a849cc2191eedfd11

Contents?: true

Size: 532 Bytes

Versions: 44

Compression:

Stored size: 532 Bytes

Contents

# frozen_string_literal: true

module ForemanAnsible
  module HostsHelper
    def ansible_hosts_multiple_actions
      return [] unless User.current.can?(:create_job_invocations) &&
                       User.current.can?(:play_roles_on_host)

      [{ action: [_('Run all Ansible roles'),
                  multiple_play_roles_hosts_path,
                  false], priority: 1000 }]
    end

    def ansible_roles_present?(host)
      host.ansible_roles.present? ||
        host.inherited_ansible_roles.present?
    end
  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
foreman_ansible-15.0.2 app/helpers/foreman_ansible/hosts_helper.rb
foreman_ansible-15.0.1 app/helpers/foreman_ansible/hosts_helper.rb
foreman_ansible-15.0.0 app/helpers/foreman_ansible/hosts_helper.rb
foreman_ansible-14.2.2 app/helpers/foreman_ansible/hosts_helper.rb
foreman_ansible-14.2.1 app/helpers/foreman_ansible/hosts_helper.rb
foreman_ansible-13.0.7 app/helpers/foreman_ansible/hosts_helper.rb
foreman_ansible-14.2.0 app/helpers/foreman_ansible/hosts_helper.rb
foreman_ansible-14.1.1 app/helpers/foreman_ansible/hosts_helper.rb
foreman_ansible-14.1.0 app/helpers/foreman_ansible/hosts_helper.rb
foreman_ansible-13.0.5 app/helpers/foreman_ansible/hosts_helper.rb
foreman_ansible-14.0.0 app/helpers/foreman_ansible/hosts_helper.rb
foreman_ansible-13.0.4 app/helpers/foreman_ansible/hosts_helper.rb
foreman_ansible-13.0.3 app/helpers/foreman_ansible/hosts_helper.rb
foreman_ansible-13.0.2 app/helpers/foreman_ansible/hosts_helper.rb
foreman_ansible-13.0.1 app/helpers/foreman_ansible/hosts_helper.rb
foreman_ansible-13.0.0 app/helpers/foreman_ansible/hosts_helper.rb
foreman_ansible-12.0.7 app/helpers/foreman_ansible/hosts_helper.rb
foreman_ansible-10.4.4 app/helpers/foreman_ansible/hosts_helper.rb
foreman_ansible-12.0.6 app/helpers/foreman_ansible/hosts_helper.rb
foreman_ansible-12.0.5 app/helpers/foreman_ansible/hosts_helper.rb