Module: ForemanAnsible::HostsHelper
- Defined in:
- app/helpers/foreman_ansible/hosts_helper.rb
Instance Method Summary collapse
Instance Method Details
#ansible_hosts_multiple_actions ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'app/helpers/foreman_ansible/hosts_helper.rb', line 5 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 |
#ansible_roles_present?(host) ⇒ Boolean
14 15 16 17 |
# File 'app/helpers/foreman_ansible/hosts_helper.rb', line 14 def ansible_roles_present?(host) host.ansible_roles.present? || host.inherited_ansible_roles.present? end |