Giter VIP home page Giter VIP logo

Comments (5)

jakubgs avatar jakubgs commented on July 29, 2024

I was wondering if there's any progress on this.

I actually tried to do this myself using these instructions:
https://www.terraform.io/docs/extend/terraform-0.12-compatibility.html
And what I did was essentially:

git clone https://github.com/radekg/terraform-provisioner-ansible.git
cd terraform-provisioner-ansible
go get github.com/hashicorp/[email protected]
go mod edit -replace=github.com/satori/[email protected]=github.com/satori/go.uuid@master
go mod tidy
make build-linux

And I had a build that seems to work with 0.12.0, but I'm not sure if I'm not missing any bugs due to changes in the Go API for Terraform.

The go.uuid upgrade was due to these errors:

mode/mode_local.go:289:54: not enough arguments in call to uuid.Must
	have (uuid.UUID)
	want (uuid.UUID, error)
mode/mode_local.gohttps://www.terraform.io/docs/extend/terraform-0.12-compatibility.html:303:55: not enough arguments in call to uuid.Must
	have (uuid.UUID)
	want (uuid.UUID, error)
...

BTW, I find it weird that this repo doesn't have go.mod and go.sum committed. It's a good practice.

Also, the scripts from bin fail if you don't change the shebang to use bash instead of sh, otherwise you'll get this on some linux flavours:

./bin/check-golang-version.sh 2: set: Illegal option -o pipefail

from terraform-provisioner-ansible.

jakubgs avatar jakubgs commented on July 29, 2024

Okay, I found my first issue, it's with the extra_vars argument for plays block.

If I define it as an argument with extra_vars = { STUFF } I get:

Error: error while validating the provisioner, reason: interface conversion: interface {} is []interface {}, not []map[string]interface {}

But if I use the extra_vars { STUFF } block format I get:

Error: Unsupported block type

Blocks of type "extra_vars" are not expected here. Did you mean to define
argument "extra_vars"? If so, use the equals sign to assign it a value.

So I assume this is some kind of change related to variable syntax, probably described in:
https://www.terraform.io/docs/extend/terraform-0.12-compatibility.html#configuration-syntax-changes

What they say is that:

If you see an error like the following from your tests after upgrading, adding the missing equals sign is usually the answer.

I would expect the issue to be here:

extraVars map[string]interface{}

Or here:
defaultsAttributeExtraVars: &schema.Schema{
Type: schema.TypeMap,
Optional: true,
Computed: true,
},

from terraform-provisioner-ansible.

ulm0 avatar ulm0 commented on July 29, 2024

@jakubgs see #126

from terraform-provisioner-ansible.

jakubgs avatar jakubgs commented on July 29, 2024

@ulm0 Oh, I guess I'm retarded because I didn't check PRs. Thanks for the link!

Files changed 8,267

Sweet Evil Step-dancing Zombie Jesus.
Now I see why go.mod and go.sum are not committed to the repo. Everything is in vendor folder.
I always though that's ugly as all hell, but to each their own.

from terraform-provisioner-ansible.

radekg avatar radekg commented on July 29, 2024

Implemented in #129. This will be release before 1st of August 2019.

from terraform-provisioner-ansible.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.