chef-apply yields error on azure provider - "The following settings shouldn't exist: path"

18 views
Skip to first unread message

marka...@gmail.com

unread,
Oct 15, 2015, 7:27:25 AM10/15/15
to Vagrant
Vagrant config of Centos 6.7 machine on Azure (Actually OpenLogic 6.7 as Azure term it)

Back on my azure band wagon again having circumvented problems I have encountered to date.

The problem is when I do a chef_apply:

  config.vm.provision 'chef_apply' do |chef|
    chef.recipe = File.read('create_user.rb')
  end

This works absolutely fine on Oracle Virtual Box (Everything always does as opposed to my experience to date of Azure)

On Azure it appears to run to completion (Judging by what I expect it do) but fails with the following:

chef apply provisioner:
* The following settings shouldn't exist: path

There are errors in the configuration of this machine. Please fix
the following errors and try again:

chef apply provisioner:
* The following settings shouldn't exist: path

 INFO interface: Machine: error-exit ["Vagrant::Errors::ConfigInvalid", "There a
re errors in the configuration of this machine. Please fix\nthe following errors
 and try again:\n\nchef apply provisioner:\n* The following settings shouldn't e
xist: path\n\n"]

I have run in debug node but absolutely no additional error test ect to help.
I have also run the same ruby file manually on the target box and it works field showing no errors and yields a 0 response code

Any guidance accepted gratefully

Regards

Mark

marka...@gmail.com

unread,
Oct 16, 2015, 2:35:59 AM10/16/15
to Vagrant
Well i gave up on trying to run Chef via the provisioning and used the shell provisioning. Basically, upload my script file and run myself.

config.vm.provision 'file', source: 'myfile.rb', destination: '/tmp/myfile.rb'

config.vm.provision 'shell', name: 'Run Chef Recipe', privileged: true, inline: <<-SHELL
    sudo su - -c 'chef-apply /tmp/myfile.rb'
SHELL

I don't know whether this is a problem with Vagrant but more likely Microsoft just being Microsoft and not being that open.

At the end of the day I do have a 'generic' vagrant file that works for optional providers but the lesson is that most things that seems to work for Oracle VB etc don't work on Azure..

Thanks

Mark
Reply all
Reply to author
Forward
0 new messages