{%- import_yaml "packer/defaults.yaml" as default_settings -%}

{%- import_yaml "packer/kernelmap.yaml" as kernelmap %}
{%- import_yaml "packer/osarchmap.yaml" as osarchmap %}

{%- set defaults = salt['grains.filter_by'](default_settings,
      default='packer',
        merge=salt['grains.filter_by'](osarchmap, grain='osarch',
          merge=salt['grains.filter_by'](kernelmap, grain='kernel')
        )
    )
-%}

{%- set packer = salt['pillar.get']('packer', default=defaults, merge=True) -%}