Sha256: c5998ca33073f5118ee78411d11abb1a3aef6670a1bcbd4c08389b3f5b0fb97a
Contents?: true
Size: 788 Bytes
Versions: 6
Compression:
Stored size: 788 Bytes
Contents
# frozen_string_literal: true module ForemanAnsible module AnsibleHostgroupsHelper def ansible_hostgroups_actions(hostgroup) play_roles = if hostgroup.all_ansible_roles.empty? { action: { content: (link_to _('Run all Ansible roles'), 'javascript:void(0);', disabled: true, title: 'No roles assigned', class: 'disabled'), options: { class: 'disabled' } }, priority: 31 } else { action: display_link_if_authorized(_('Run all Ansible roles'), hash_for_play_roles_hostgroup_path(id: hostgroup), 'data-no-turbolink': true, title: _('Run all Ansible roles on hosts belonging to this host group')), priority: 31 } end [play_roles] if User.current.can?(:create_job_invocations) end end end
Version data entries
6 entries across 6 versions & 1 rubygems