Skip to content
This repository was archived by the owner on Mar 24, 2022. It is now read-only.
This repository was archived by the owner on Mar 24, 2022. It is now read-only.

Pillar data in Vagrantfiles doesn't appear to be available on highstate run #101

Description

@davepeck

I'm seeing this with vagrant-salt == 0.4.0, salt == 0.16.3, and vagrant == 1.2.7.

I'm new here, so it's possible I'm misunderstanding something pretty basic about how pillar data is exposed, or when it should be available. But this does seem like a bug at the moment.

To reproduce:

In your Vagrantfile:

config.vm.provision :salt do |salt|
    salt.minion_config = "salt/minion"
    salt.verbose = true
    salt.pillar({"key" => "value"})
    salt.run_highstate = true
end

In some init.sls file:

{% for pillar_key in pillar.keys() %}
do-pillar-{{ pillar_key }}:
    cmd.run:
        - name: echo {{ pillar_key }}
{% endfor %}

Now run vagrant provision. You should see output for every available pillar key.

Expected result:

The key key is present in pillar

Actual result:

The key key is not present in pillar. (I only see one key, called master.)

Since this is annoying to reproduce, I've created a repository that should just reproduce it directly. git clone https://github.com/davepeck/salty-vagrant-pillar-question and then vagrant up.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions