Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashes if pillar_from_directories is the only pillar configuration #205

Open
ipmb opened this issue Feb 6, 2018 · 1 comment
Open

Crashes if pillar_from_directories is the only pillar configuration #205

ipmb opened this issue Feb 6, 2018 · 1 comment
Labels
Milestone

Comments

@ipmb
Copy link

ipmb commented Feb 6, 2018

My provisioner looks like this:

provisioner:
  name: salt_solo
  salt_version: 2016.11
  is_file_root: true
  local_salt_root: .
  state_top_from_file: true
  pillars_from_directories:
    - pillar

When doing the converge, this code block is executed:

if pillars.nil? && pillars_from_files.nil?
if not config[:local_salt_root].nil?
pillars_location = File.join(config[:local_salt_root], 'pillar')
sandbox_pillar_path = File.join(sandbox_path, config[:salt_pillar_root])
cp_r_with_filter(pillars_location, sandbox_pillar_path, config[:salt_copy_filter])
return
end
return

In my case, it failed because my local_salt_root did not have a pillar directory.

If I add:

  pillars:
    fake.sls: []

It works as expected. I would expect everything to work if I only define pillars_from_directories in my provisioner.

@gtmanfred gtmanfred added the bug label Feb 6, 2018
@gtmanfred gtmanfred added this to the Approved milestone Feb 6, 2018
@gtmanfred
Copy link
Contributor

Thanks for reporting, I will get this fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants