Commit Graph

51 Commits

Author SHA1 Message Date
Matthew Hooker 9f87213ba4
tests and docs for #5831 2018-01-31 13:08:25 -08:00
Evan Machnic 5cedfc4557 Fixed go format errors 2018-01-31 11:06:31 -06:00
Evan Machnic 7354247933 Added policyGroup and policyName to Packer Communicator 2018-01-31 11:01:08 -06:00
Evan Machnic fe90f79704 Changed new code to use tabs instead of spaces 2018-01-31 10:54:40 -06:00
Evan Machnic 1f92aa2c0a Added Policyfile support to chef-client provisioner 2018-01-31 10:49:04 -06:00
Gennady Lipenkov 53aaf84100 Support 'trusted_certs_dir' chef-client configuration option 2018-01-13 01:53:49 +03:00
Casey Robertson 8f02150178 Changes Linux install URL to omnitruck. Changes powershell install to use omnitruck rather than hard-coded 32-bit url 2017-11-28 14:23:12 -08:00
Matthew Hooker 81522dced0
move packer to hashicorp 2017-04-04 13:39:01 -07:00
Matthew Hooker d1b20b3d9c
remove a bunch of dead code.
https://github.com/dominikh/go-tools/tree/master/cmd/unused
2017-03-28 20:36:20 -07:00
Matthew Hooker 825f69c64d
provisioner/chef-client: only upload knife config if we're cleaning 2017-02-09 23:37:35 -08:00
Matthew Hooker d920b3fbf4 run gofmt 2016-11-01 14:08:04 -07:00
Matthew Hooker a8e57d83d2 gofmt project.
noticed many unrelated changes being added to patches because of gofmt.

ran `find . -not -path "./vendor/*" -name "*.go" -exec gofmt -w {} \;`
2016-09-29 14:13:06 -07:00
Jamie Snell 7b3224f3c7 rename KnifeChefTemplate to KnifeTemplate 2016-06-14 13:42:53 -05:00
Jamie Snell 4847e891b0 Fix knife clean-up run on windows 2016-06-14 13:34:25 -05:00
Justin Nauman f2b0fabe66 Fixes #3466 - Remote path needs to be set prior to config interpolation (#3468) 2016-04-29 19:21:27 -07:00
Chris Bednarski 569e6cc464 go fmt 2016-02-08 17:34:06 -08:00
Chris Bednarski 87532b1b00 Merge branch 'chef-provisioner-windows' of https://github.com/sneal/packer into f-chef-provisioner-windows 2016-01-28 14:55:17 -08:00
Chris Bednarski 3eabc6253d Merge pull request #2653 from evertrue/evertrue/eherot/add_data_bag_secret_to_chef_client
Chef-client provisioner: Add encrypted data bag secret path (Fixes #1945)
2016-01-13 13:59:48 -08:00
Shawn Neal 8014dac742 Add Windows support to Chef provisioners
- Add guest os type to change the default Chef-Solo and Chef-Client provisioner behavior. Paths, commands etc.
- Change Chef installation download location to chef.io domain
- Add encrypted data bag secret configuration
2015-10-01 10:04:59 -07:00
Tim Smith 72e8119233 Download chef from chef.io 2015-08-25 21:53:50 -07:00
Eric Herot f625c985af Chef-client provisioner: Add encrypted data bag secret support (Fixes #1945) 2015-08-21 16:05:47 -07:00
Chris Bednarski 715662f60b Reformat 2015-07-27 16:42:06 -07:00
Schreiter, Wulf-Thilo 18438cf291 Add knife config by template
Since the chef-client provisioner is cleaning the node and client at the chef-server from the provisioned node
it needs to have a flexible configuration

This is replacing the used knife flags: -s '<chef-server-url>' -k '/tmp/packer-chef-client/client.pem' -u '<client-name>'
and puts their values into a generated knife.rb

Additionally the knife.rb may include the optional ssl_verify_mode attribute to enable the verify mode verify_none

Background:

When deleting node and client to a self-hosted chef-server using self signed cerfiticates the usage of

    knife node delete <node-name> -y -s '<chef-server-url>' -k '/tmp/packer-chef-client/client.pem' -u '<client-name>'

will lead into a ssl verification failure.

The error output of the knife call is somthing like:

    2015/06/24 12:29:17 ui:     docker: WARNING: No knife configuration file found
    docker: WARNING: No knife configuration file found
    2015/06/24 12:29:17 ui:     docker: ERROR: SSL Validation failure connecting to host: 172.16.117.63 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B:
    certificate verify failed
    docker: ERROR: SSL Validation failure connecting to host: 172.16.117.63 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
    2015/06/24 12:29:17 ui:     docker: ERROR: Could not establish a secure connection to the server.
    docker: ERROR: Could not establish a secure connection to the server.
    2015/06/24 12:29:17 ui:     docker: Use 'knife ssl check' to troubleshoot your SSL configuration.
    docker: Use 'knife ssl check' to troubleshoot your SSL configuration.
    2015/06/24 12:29:17 ui:     docker: If your Chef Server uses a self-signed certificate, you can use
    docker: If your Chef Server uses a self-signed certificate, you can use
    2015/06/24 12:29:17 ui:     docker: 'knife ssl fetch' to make knife trust the server's certificates.
    docker: 'knife ssl fetch' to make knife trust the server's certificates.
    2015/06/24 12:29:17 ui:     docker:
    docker:
    2015/06/24 12:29:17 ui:     docker: Original Exception: OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
    docker: Original Exception: OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
    2015/06/24 12:29:17 packer-builder-docker: 2015/06/24 12:29:17 Executed command exit status: 100
2015-06-24 15:22:59 +02:00
Mitchell Hashimoto 7c8e86c9c5 provisioner/*: fix interpolation context 2015-06-22 12:26:54 -07:00
Mitchell Hashimoto 711dfc9d0a provisioner/chef: show command in output 2015-06-15 14:35:54 -07:00
Mitchell Hashimoto 14787fd4cc provisioner/chef-client: run cleanup on node [GH-1295] 2015-06-15 14:29:12 -07:00
Mitchell Hashimoto 106c9403ed provisioner/chef-client: chmod the directories 2015-06-15 13:41:07 -07:00
Mitchell Hashimoto bee3b59c40 Merge branch 'chef-client-client_key' of https://github.com/ameir/packer into ameir-chef-client-client_key 2015-06-15 13:40:33 -07:00
Mitchell Hashimoto c2381be44f provisioner/*: convert to interpolation 2015-05-27 14:41:47 -07:00
Ameir Abdeldayem 5c06af872d Support chef-client 'client_key' and default to <staging
dir>/client.pem.
2015-04-09 02:15:16 -04:00
Timur Batyrshin e4c544b3e2 added ssl_verify_mode parameter to chef-client provisioner 2014-12-05 20:26:41 +03:00
James Massara 1837c7189a Added tests for prevent_sudo 2014-11-27 06:24:54 -08:00
James Massara a5ca2e5a27 Use sudo only if prevent_sudo is not set 2014-11-27 06:24:54 -08:00
Scott Rahner 4383b435a4 adding default nodename 2014-09-24 19:40:34 -04:00
Mitchell Hashimoto 75395af12d Merge branch '1064-fix-upload-file-permissions' of github.com:rasa/packer into rasa-1064-fix-upload-file-permissions
Conflicts:
	builder/parallels/common/step_upload_parallels_tools.go
	builder/vmware/common/step_upload_tools.go
	provisioner/chef-client/provisioner.go
	provisioner/chef-solo/provisioner.go
2014-09-08 13:20:46 -07:00
Mitchell Hashimoto 802168f4b5 Merge branch 'add-chef-environment' of github.com:cfortier2/packer into cfortier2-add-chef-environment
Conflicts:
	provisioner/chef-client/provisioner.go
2014-09-05 16:13:32 -07:00
Mitchell Hashimoto 825864a9ea Merge branch 'additional-user-variables' of github.com:nBerg/packer into nBerg-additional-user-variables
Conflicts:
	builder/amazon/common/run_config.go
2014-09-02 09:57:52 -07:00
sawanoboly 18dddb516b Fix remotePaths when provisioning Linux from Windows 2014-07-11 19:12:34 +09:00
Nina Berg bd1a0d07fb Added some variables to amazon-ebs builder and chef-client provisioner 2014-07-08 13:15:17 -04:00
cfortier2 e908cc1733 add chef_environment test 2014-05-21 09:30:18 -04:00
cfortier2 25386f8e8e add support for chef_environment 2014-05-21 09:24:34 -04:00
Ross Smith II d92179847d provisioner/file: set file/directory permissions
fixes #1064
2014-05-09 21:03:35 -07:00
Mitchell Hashimoto 9beac8d286 provisioner/chef-client: proper ordering of args [GH-1100] 2014-05-01 14:13:22 -07:00
Ben Langfeld b801713e83 Node DNA needs to handle multiple types
Makes chef-client provisioner consistent with chef-solo in its handling of nested JSON as well as strings.

Fixes #1096
2014-05-01 12:48:45 -03:00
James Cline 6017f895f1 provisioners/chef-client: delete correct client
The server URL was being passed through rather than the client name.
2014-04-28 15:29:15 -07:00
Mitchell Hashimoto 5fac6c79c4 fmt 2014-04-26 11:12:43 -07:00
James Cline eb4ba76e1a provisioner/chef-client: validation_client_name
Allows setting of validation_client_name from packer template json.
2014-04-24 00:09:30 -07:00
Mitchell Hashimoto 3de16f20b9 privisioner/chef-client: don't chown with ubuntu [GH-939] 2014-03-12 21:05:25 -07:00
Mitchell Hashimoto 000e5b67ff provisioner/chef-client: docs and validation key path 2014-02-24 09:45:04 -08:00
Mitchell Hashimoto d7e6409b9a provisioner/chef-client: clean up 2014-02-24 08:53:56 -08:00