Sha256: 34a854b78cb990b5386b93b4fb0c3763da7274db4853f9a61a327b7cd06c3947

Contents?: true

Size: 354 Bytes

Versions: 16

Compression:

Stored size: 354 Bytes

Contents

module ForemanAnsible
  # Define common behaviors between models that have many Ansible roles,
  # currently Host and Hostgroup. Takes care of inheritance, etc...
  module HasManyAnsibleRoles
    extend ActiveSupport::Concern

    included do
      def all_ansible_roles
        (ansible_roles + inherited_ansible_roles).uniq
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
foreman_ansible-2.0.4 app/models/concerns/foreman_ansible/has_many_ansible_roles.rb
foreman_ansible-2.0.3 app/models/concerns/foreman_ansible/has_many_ansible_roles.rb
foreman_ansible-2.0.2 app/models/concerns/foreman_ansible/has_many_ansible_roles.rb
foreman_ansible-2.0.1 app/models/concerns/foreman_ansible/has_many_ansible_roles.rb
foreman_ansible-2.0.0 app/models/concerns/foreman_ansible/has_many_ansible_roles.rb
foreman_ansible-1.4.6 app/models/concerns/foreman_ansible/has_many_ansible_roles.rb
foreman_ansible-1.4.5 app/models/concerns/foreman_ansible/has_many_ansible_roles.rb
foreman_ansible-1.4.3 app/models/concerns/foreman_ansible/has_many_ansible_roles.rb
foreman_ansible-1.4.2 app/models/concerns/foreman_ansible/has_many_ansible_roles.rb
foreman_ansible-1.4.1 app/models/concerns/foreman_ansible/has_many_ansible_roles.rb
foreman_ansible-1.4.0 app/models/concerns/foreman_ansible/has_many_ansible_roles.rb
foreman_ansible-1.3.1 app/models/concerns/foreman_ansible/has_many_ansible_roles.rb
foreman_ansible-1.3.0 app/models/concerns/foreman_ansible/has_many_ansible_roles.rb
foreman_ansible-1.2.1 app/models/concerns/foreman_ansible/has_many_ansible_roles.rb
foreman_ansible-1.2 app/models/concerns/foreman_ansible/has_many_ansible_roles.rb
foreman_ansible-1.1 app/models/concerns/foreman_ansible/has_many_ansible_roles.rb