Sha256: c2c02938b21c56cfa7a69be57ab94759555bac75d8d7879a849cc2191eedfd11

Contents?: true

Size: 532 Bytes

Versions: 48

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

48 entries across 48 versions & 1 rubygems

Version Path
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
foreman_ansible-10.4.3 app/helpers/foreman_ansible/hosts_helper.rb
foreman_ansible-12.0.4 app/helpers/foreman_ansible/hosts_helper.rb
foreman_ansible-10.4.2 app/helpers/foreman_ansible/hosts_helper.rb
foreman_ansible-12.0.3 app/helpers/foreman_ansible/hosts_helper.rb
foreman_ansible-12.0.2 app/helpers/foreman_ansible/hosts_helper.rb
foreman_ansible-12.0.1 app/helpers/foreman_ansible/hosts_helper.rb
foreman_ansible-12.0.0 app/helpers/foreman_ansible/hosts_helper.rb
foreman_ansible-11.2.1 app/helpers/foreman_ansible/hosts_helper.rb
foreman_ansible-11.2.0 app/helpers/foreman_ansible/hosts_helper.rb
foreman_ansible-11.1.2 app/helpers/foreman_ansible/hosts_helper.rb
foreman_ansible-11.1.1 app/helpers/foreman_ansible/hosts_helper.rb
foreman_ansible-10.4.1 app/helpers/foreman_ansible/hosts_helper.rb
foreman_ansible-11.1.0 app/helpers/foreman_ansible/hosts_helper.rb
foreman_ansible-10.4.0 app/helpers/foreman_ansible/hosts_helper.rb
foreman_ansible-10.3.0 app/helpers/foreman_ansible/hosts_helper.rb
foreman_ansible-11.0.0 app/helpers/foreman_ansible/hosts_helper.rb