Sha256: 8f525d532367198604b494bc7bef8f0ad5df20d9f3cff74fe014ce01be6afb55
Contents?: true
Size: 1012 Bytes
Versions: 59
Compression:
Stored size: 1012 Bytes
Contents
module Mutations module AnsibleVariableOverrides class Update < ::Mutations::UpdateMutation graphql_name 'UpdateAnsibleVariableOverrideMutation' description 'Updates Ansible Variable Override' resource_class LookupValue argument :value, ::Types::RawJson, required: true argument :match, String, required: false argument :omit, Boolean, required: false argument :host_id, Int, required: true argument :ansible_variable_id, Int, required: true field :overriden_ansible_variable, ::Types::OverridenAnsibleVariable, :null => true def resolve(host_id:, ansible_variable_id:, **kwargs) result = super kwargs host = Host.find host_id vars = AnsibleVariable.where :id => ansible_variable_id resolver = ::ForemanAnsible::OverrideResolver.new(host, vars.pluck(:id)) result.merge :overriden_ansible_variable => ::Presenters::OverridenAnsibleVariablePresenter.new(vars.first, resolver) end end end end
Version data entries
59 entries across 59 versions & 1 rubygems