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

Migrate to Terraform 12 #6

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
- docker
language: go
go:
- 1.9.1
- 1.13.3
install:
- bash scripts/gogetcookie.sh
- go get github.com/kardianos/govendor
Expand Down Expand Up @@ -35,4 +35,4 @@ deploy:
skip_cleanup: true
file_glob: true
on:
repo: Mwea/terraform-provisioner-chefsolo
repo: mougams/terraform-provisioner-chefsolo
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ Required attributes for using chefsolo provisioner are :
`output_dir` : Where all the generated files by the provisioner should be output

`nodes` : An array of Node JSON files, chef will use them in order to discover nodes during provisioning
( these can be very easily generated by the chefsolo datasource, refer to this : https://github.com/Mwea/terraform-provider-chefsolo/ )
( these can be very easily generated by the chefsolo datasource, refer to this : https://github.com/mougams/terraform-provider-chefsolo/ )

`target_node`: A DNA JSON file, this is the DNA that will be applied to your machine. ( same as above, this file can be generated automatically with this plugin : https://github.com/Mwea/terraform-provider-chefsolo/ )
`target_node`: A DNA JSON file, this is the DNA that will be applied to your machine. ( same as above, this file can be generated automatically with this plugin : https://github.com/mougams/terraform-provider-chefsolo/ )

`instance_id`: The node ID you want to target during chef run (must match with the targeted node)

Expand Down
16 changes: 8 additions & 8 deletions chefsolo/provisioner_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ func TestResourceProvider_linuxInstallChefClient(t *testing.T) {
Commands: map[string]bool{
"curl -LO https://omnitruck.chef.io/install.sh": true,
"bash ./install.sh -v \"11.18.6\" -c stable": true,
"rm -f install.sh": true,
"rm -f install.sh": true,
},
},
}
Expand Down Expand Up @@ -467,22 +467,22 @@ cookbook_path '/opt/chef/0/output/cookbooks'
node_path '/opt/chef/0/output/nodes'
role_path '/opt/chef/0/output/roles'
data_bag_path '/opt/chef/0/output/data_bags'
rubygems_url 'http://nexus.query.consul/content/groups/rubygems'
environment_path '/opt/chef/0/output/environments'`

const defaultChefService = `
[Unit]
Description=Run chef client each time the machine reboot
After = network.target auditd.service
After=network.target auditd.service

[Service]
Type=simple
Type=oneshot
WorkingDirectory=/opt/chef/0/output
ExecStart=/usr/bin/chef-client -z -c /opt/chef/0/client.rb -j "/opt/chef/0/output/dna/toto.json" -E "_default"
ExecReload = /bin/kill -HUP $MAINPID
SuccessExitStatus = 3
Restart = on-failure
SuccessExitStatus=3
Restart=on-failure
RestartSec=60
RemainAfterExit=true

[Install]
WantedBy = multi-user.target
WantedBy=multi-user.target
`
30 changes: 30 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
module github.com/mougams/terraform-provisioner-chef-solo

go 1.13

require (
github.com/Mwea/terraform-provisioner-chefsolo v0.2.3
github.com/apparentlymart/go-cidr v1.0.1 // indirect
github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2
github.com/hashicorp/go-cleanhttp v0.5.1 // indirect
github.com/hashicorp/go-getter v1.4.0 // indirect
github.com/hashicorp/go-hclog v0.10.1 // indirect
github.com/hashicorp/go-plugin v1.0.1 // indirect
github.com/hashicorp/go-version v1.2.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hashicorp/hcl2 v0.0.0-20191002203319-fb75b3253c80 // indirect
github.com/hashicorp/hil v0.0.0-20190212132231-97b3a9cdfa93 // indirect
github.com/hashicorp/terraform v0.12.7
github.com/masterzen/winrm v0.0.0-20190308153735-1d17eaf15943 // indirect
github.com/mitchellh/go-homedir v1.1.0
github.com/mitchellh/go-linereader v0.0.0-20190213213312-1b945b3263eb
github.com/mitchellh/gox v1.0.1 // indirect
github.com/mitchellh/reflectwalk v1.0.1 // indirect
github.com/packer-community/winrmcp v0.0.0-20180921211025-c76d91c1e7db // indirect
github.com/spf13/afero v1.2.1
github.com/theckman/go-flock v0.4.0
github.com/zclconf/go-cty v1.2.0 // indirect
golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876 // indirect
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553 // indirect
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
)
579 changes: 579 additions & 0 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"github.com/Mwea/terraform-provisioner-chefsolo/chefsolo"
"github.com/mougams/terraform-provisioner-chef-solo/chefsolo"
"github.com/hashicorp/terraform/plugin"
)

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading