jonmorehouse / terraform-provisioner-ansible

A provisioner for bootstrapping terraform resources with ansible
524 stars 68 forks source link

Issue on Mac OSx #17

Open alenegro81 opened 8 years ago

alenegro81 commented 8 years ago

I'm trying to use it under mac osx. I get a lot of issues.

First in order to use it I have to change the .terraformrc in the following way:

providers { ansible = "/usr/local/bin/terraform-provisioner-ansible" } provisioners { ansible = "/usr/local/bin/terraform-provisioner-ansible" }

And in any case I get another error:

Any help?

crestenstclair commented 8 years ago

Same issue here

tboerger commented 7 years ago

I have posted https://github.com/Homebrew/homebrew-core/pull/6149 to get it included into homebrew. The docs need an update because provisioners { ansible = "/usr/local/bin/terraform-provisioner-ansible" } should be correct.

ababra commented 7 years ago

@tboerger Looks like the latest version of Terraform (v0.9.4) is no longer compatible with the provisioner version available on Homebrew. I received the following error when attempting to run a terraform plan:

1 error(s) occurred:

* provisioner.ansible: Incompatible API version with plugin. Plugin version: 1, Ours: 4
tboerger commented 7 years ago

@ababra have you tried to reinstall terraform-provisioner-ansible?

igormukhingmailcom commented 7 years ago

@tboerger This is what was installed by running brew install terraform terraform-provisioner-ansible:

https://homebrew.bintray.com/bottles/terraform-0.9.6.sierra.bottle.tar.gz
https://homebrew.bintray.com/bottles/terraform-provisioner-ansible-0.0.2.sierra.bottle.tar.gz

But issue still not gone:

* provisioner.ansible: Incompatible API version with plugin. Plugin version: 1, Ours: 4
techfort commented 7 years ago

hitting the same issue here - is this project maintained? last commit was a year ago @jonmorehouse (not a problem if it's not but i'd just like to know, not expecting anything here..)

tboerger commented 7 years ago

@igormukhingmailcom i think it's related to this outdated project.

igormukhingmailcom commented 7 years ago

Guys, I've workaround that issue by downgrading terraform to 0.7.12. This is my notes below (I'm not 100% sure I've added all required steps, but hope it will be helpful):

echo 'export GOPATH=$HOME/go' >> $HOME/.bashrc
source $HOME/.bashrc
go env | grep GOPATH
cd $GOPATH
mkdir {src,pkg,bin}
cd src/
git clone https://github.com/jonmorehouse/terraform-provisioner-ansible
cd terraform-provisioner-ansible/
go get -v
go build

# In case of error
# @see https://github.com/jonmorehouse/terraform-provisioner-ansible/issues/33
cd $GOPATH/src/github.com/hashicorp/terraform
git checkout v0.7.12
go get -v
PATH=$PATH:$GOPATH/bin XC_OS=darwin make fmt
PATH=$PATH:$GOPATH/bin XC_OS=darwin make bin

cd $GOPATH/src/github.com/hashicorp/terraform-provisioner-ansible
go build

cd /usr/local/bin
rm terraform
rm terraform-provisioner-ansible

ln -s $GOPATH/src/github.com/hashicorp/terraform/bin/terraform
ln -s $GOPATH/src/github.com/hashicorp/terraform-provisioner-ansible/terraform-provisioner-ansible
ls -l /usr/local/bin|grep terraform
jeff1985 commented 6 years ago

yep, same issue here, this provisioner does not work with the latest terraform!