Sha256: b5a8dbce81889c2afa113190d7e1066d56bb26eed4fb8dea06ab9ee83e8b15f7
Contents?: true
Size: 1.03 KB
Versions: 24
Compression:
Stored size: 1.03 KB
Contents
module Types class OverridenAnsibleVariable < ::Types::AnsibleVariable description 'Ansible Variable with an override value for a host' model_class ::AnsibleVariable field :current_value, ::Types::AnsibleVariableOverride, :null => true field :lookup_values, ::Types::LookupValue.connection_type do argument :match, String, required: false end field :meta, ::Types::Meta, resolve: (proc do |object| { :can_edit => ::User.current.can?(object.ansible_variable.permission_name(:edit), object.ansible_variable), :can_destroy => ::User.current.can?(object.ansible_variable.permission_name(:destroy), object.ansible_variable) } end) def lookup_values(match: nil) return CollectionLoader.for(object.ansible_variable.class, :lookup_values).load(object.ansible_variable) unless match scope = lambda do |sc| sc.where(:match => match) end CollectionLoader.for(object.ansible_variable.class, :lookup_values, scope).load(object.ansible_variable) end end end
Version data entries
24 entries across 24 versions & 1 rubygems