41 Commits

Author SHA1 Message Date
Megan Marsh
9e47696dff move helper/config to bundle with the other template definitions 2020-11-18 10:34:59 -08:00
Megan Marsh
3f6deb8828 move multistep into the plugin sdk 2020-11-17 16:31:03 -08:00
Megan Marsh
7d658149ea update tests and website and generated partials to reflect new package format 2020-11-17 10:36:01 -08:00
Megan Marsh
c4d0c5505a fix tests
regenerate code
regenerate code, revendor
fix website
2020-11-13 15:00:12 -08:00
Megan Marsh
e04eaa89e6 move steps and step configs from packer/common to packer/common/commonsteps 2020-11-13 11:15:04 -08:00
Larry
20472bc12f
Update provisioner_test.go 2020-08-25 09:49:51 -05:00
Larry
f4a2838716
Added Tests for AnsibleSSHExtraArgs 2020-08-25 08:54:25 -05:00
Artem Zavatskiy
bec367347d ansible-provisioner: fix tests related to ssh agent 2020-07-27 14:31:32 +03:00
Megan Marsh
8fc4e03139
quote packer build name to handle names with spaces (#9590) 2020-07-16 11:20:06 +02:00
Sylvia Moss
3dc7a53125
Correct check if PackerHttpAddr is implemented or not (#9498) 2020-06-29 16:17:21 +02:00
Lane, Larry
5976929595 Fix for #9283 2020-06-02 17:30:03 -05:00
Lane, Larry
f4254e9cbf updated test 2020-05-22 08:12:14 -05:00
Lane, Larry
c689eb9694 added test 2020-05-22 08:07:25 -05:00
Lane, Larry
de12432e6b add test 2020-05-22 07:58:57 -05:00
Megan Marsh
b66e49223d extract the building of command args into a testable helper function 2020-04-01 16:07:14 -07:00
Megan Marsh
73c87044fd fix tests 2020-04-01 11:31:48 -07:00
Megan Marsh
eda9ce70e7 update tests 2020-04-01 11:31:48 -07:00
Megan Marsh
9a40403433 clean up tests 2020-04-01 11:31:48 -07:00
Megan Marsh
6c756a7b31 fix tests 2020-04-01 11:31:48 -07:00
Megan Marsh
ca5814ab74 move proxy behind feature flag 2020-04-01 11:31:48 -07:00
Megan Marsh
39fd462b56 change all provision func signatures to use map[string]interface{} 2019-12-12 15:38:32 -08:00
Megan Marsh
0ca7c9f397 fix tests 2019-12-11 16:29:35 -08:00
Adrien Delorme
c7ce4d598e change Provisioner to be passed a context for cancellation 2019-04-03 15:55:54 +02:00
Adrien Delorme
5a6dffde9a use port as ints 2019-03-19 15:01:12 +01:00
Rickard von Essen
52b55fb899
ansible: change local_port to uint instead of string 2019-02-04 18:47:42 +01:00
Adrien Delorme
7c63c322c7 make provisioner/ansible/provisioner_test.go invisible to windows 2018-10-16 18:40:07 +02:00
Megan Marsh
a0edaf6c46 Going to revert this change for now, becuase of potential issues that arise from calling Prepare() twice
Revert "use statebag instead of SetSharedState for winRM password"

This reverts commit b35acbd8798a1baa645f0d181731a9cd9318a61c.
2018-09-10 16:48:42 -07:00
Megan Marsh
b35acbd879 use statebag instead of SetSharedState for winRM password 2018-08-24 13:51:16 -07:00
Aidan Feldman
b894c925d1
make user retrieval for Ansible provisioner more robust
Previously, the Ansible provisioner would look for the username from the
`USER` environment variable. Unfortunately, this is not always set -
particularly in Docker containers. It's very confusing to understand why
the error is happening.

Switched to using Go's built-in `os/user` package for retrieving the
current username. @rickard-von-essen had done this in 7369841, but
moved away from it in d59844f because, at the time, it wasn't possible
to use that library with cross-compilation. This was fixed in Go in

795e712b72
2018-01-03 02:52:41 -05:00
Dan Fuchs
97c819dc15 Merge branch 'master' of https://github.com/mitchellh/packer into ansible-inventory-dir 2017-04-20 10:34:03 -05:00
Dan Fuchs
3fc809c05b Ansible provisioner: check if inventory directory exists during prepare 2017-04-04 22:49:24 -05:00
Dan Fuchs
492bff474b Ansible provisioner: Specify full path to generated inventory file 2017-04-04 22:04:26 -05:00
Dan Fuchs
609e70face inventory_directory option for ansible provisioner
Add an `inventory_directory` setting to the Ansible provisioner that
allows a user to specify a directory in which the Packer Ansible
provisioner would write the generated inventory file.  If a value is
specified for this setting, then have the Packer Ansible provisioner
pass this directory as the -i arg when it calls ansible.

This would allow an Ansible playbook used by the Packer Ansible
provisioner to use variables specified in `host_vars` and `group_vars`
in this inventory directory.
2017-04-04 16:43:46 -05:00
Matthew Hooker
81522dced0
move packer to hashicorp 2017-04-04 13:39:01 -07:00
Andrey Chernih
7548024720 More verbose error message when ansible-playbook fails
I've spent 1 hour today debugging why packer does not want to work with
ansible. It turns out `ansible-playbook` command was returning non-zero
exit status because of the file system permission problem.

Output before change:

    % packer build rabbitmq.json
    amazon-ebs output will be in this color.

    1 error(s) occurred:

    * exit status 1

Output after change:

    amazon-ebs output will be in this color.

    1 error(s) occurred:

    * Error running "ansible-playbook --version": exit status 1
2017-03-21 20:26:41 -07:00
Ricard Clau
049fb2d9c1 actually check for errors in functional tests 2016-07-07 20:01:23 +01:00
Ricard Clau
0c81e49f83 Adding a functional test with an Ansible message very long 2016-07-07 01:12:57 +01:00
Rickard von Essen
d6716f6ee1 Ansible: don't use deprecated ssh options when ver above 2.0
Ansible 2.0 deprecated ansible_ssh_user, ansible_ssh_port, ansible_ssh_host
instead use ansible_user, ansible_port, and ansible_host in the
inventory file.

Closes #3275
2016-03-07 13:26:22 +01:00
Billie Cleek
a5ab53bf5e update ansible tests
Update tests to account for changes made in #3149
2016-02-10 14:16:02 -08:00
Billie H. Cleek
5366393f9f fix tests 2015-10-31 10:39:33 -07:00
Billie H. Cleek
cc8ca3098e add ansible provisioner 2015-10-31 10:39:33 -07:00