Commit Graph

145 Commits

Author SHA1 Message Date
Megan Marsh 823ff34434 remove noop ui, replace in adapter and ansible tests with sdk's TestUi 2020-12-07 15:45:16 -08:00
Megan Marsh be5763ec41 move provisioner interface into sdk 2020-12-01 14:25:14 -08:00
Megan Marsh d5971ca25e fix tests by moving mock hooks and communicators, and BasicUi definition, into SDK 2020-11-30 14:30:30 -08:00
Megan Marsh 56a45b04ab Move hook and communicator definitions to packer-plugin-sdk 2020-11-30 14:30:30 -08:00
Megan Marsh c70870cb83 move multierror and multierrorappend into sdk 2020-11-30 14:29:06 -08:00
Megan Marsh 001886670d move Ui definition into the packer plugin sdk. 2020-11-30 14:26:54 -08:00
Megan Marsh f8f1ebf0c7 move version and useragent definitions into sdk 2020-11-18 11:42:02 -08:00
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 1ffc358ada move tmp helper func into packer-plugin-sdk 2020-11-16 15:13:08 -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
Megan Marsh 6402362018 create packer-plugin-sdk directory and begin moving the relevant folders into it. 2020-11-13 10:47:36 -08:00
Megan Marsh 46cf8a1602 add all provisioner version files 2020-11-10 15:01:07 -08:00
Megan Marsh 8ecd16db81 regenerate code 2020-11-10 08:16:59 -08:00
Megan Marsh 88e03280b6
Extract plugin-specific examples to plugin directories (#10228)
* move alicloud examples from common example directory to alicloud builder

* move amazon examples to amazon builder dir

* move examples into ansible provisioner directory

* move azure examples to builder dir

* move hyperone examples into builder directory

* move jdcloud builder examples into builder directory

* move tencent cloud examples into the builder directory

* move ucloud examples into ucloud builder directory
2020-11-09 12:17:41 +01:00
Megan Marsh c0ce8a9414 rework fixer deprecation code so we know what plugins they relate to 2020-10-21 15:28:59 -07:00
js-g d7507ae67c fix (provisioner/ansible): add checks for both roles and collections 2020-09-29 13:46:59 -04:00
js-g 08d485b1f9 GH 10008: fix ansible-galaxy for v1 files 2020-09-28 18:32:27 -04:00
Artis3n 4ecade3908 collectionsPath appends to the correct slice
Fixes what would have been a failure if roles+collections were tested at
once
2020-09-05 18:43:10 -04:00
Artis3n 39183d1b76 Updated documentation with `make generate` 2020-09-05 18:29:52 -04:00
Artis3n 611899f7b2 Actually use the collectionArgs, that would be helpful 2020-09-05 16:51:38 -04:00
Artis3n 3d2259a6d4 Typo fix in comment 2020-09-05 16:19:05 -04:00
Artis3n 19f0114035 Added support for Ansible Collections to the Galaxy install
Fixes #8821
2020-09-05 16:10:02 -04:00
Larry 0bcf4f2613
Update provisioner.hcl2spec.go 2020-08-25 10:11:56 -05: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
Larry 7cb17f64a6
Added AnsibleSSHExtraArgs 2020-08-25 08:53:41 -05:00
Megan Marsh b52143f528 update docs for command and make sure they get generated properly so they appear in the docs 2020-08-05 10:30:16 -07:00
Artem Zavatskiy bec367347d ansible-provisioner: fix tests related to ssh agent 2020-07-27 14:31:32 +03:00
Artem Zavatskiy c0048daed5 fix agent auth in ssh communicator for ansible provisioner (#9488) 2020-07-23 16:03:01 +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
Megan Marsh b5b8f2e308
add template option for templating the inventory file lines (#9438) 2020-06-17 11:05:48 +02:00
Megan Marsh 3d7c9cb9c2
make ansible provisioner docs generated from code (#9439) 2020-06-17 10:09:03 +02:00
Lane, Larry 5976929595 Fix for #9283 2020-06-02 17:30:03 -05:00
Adrien Delorme 40947c2bf6
HCL2: generate hcl tags with go-cty tags too (#9306)
This will allow to generate the config files:

```go
package main

import (
	"fmt"

	"github.com/hashicorp/hcl/v2/gohcl"
	"github.com/hashicorp/hcl/v2/hclwrite"
	"github.com/hashicorp/packer/builder/alicloud/ecs"
)

func main() {
	name := "name"
	app := ecs.FlatConfig{
		AlicloudImageName: &name,
		ECSSystemDiskMapping: &ecs.FlatAlicloudDiskDevice{
			DiskName: &name,
		},
	}

	f := hclwrite.NewEmptyFile()
	block := gohcl.EncodeAsBlock(&app, `source "something" "something"`)
	f.Body().AppendBlock(block)
	fmt.Printf("%s", f.Bytes())
}

```

Will output:

```
source "something" "something" {
  packer_user_variables      = null
  packer_sensitive_variables = null
  image_name                 = "name"
  image_share_account        = null
  image_unshare_account      = null
  image_copy_regions         = null
  image_copy_names           = null
  tags                       = null
  tag                        = null
  system_disk_mapping        = { disk_category = null, disk_delete_with_instance = null, disk_descri
ption = null, disk_device = null, disk_encrypted = null, disk_name = "name", disk_size = null, disk_
snapshot_id = null }
  image_disk_mappings        = null
  ssh_remote_tunnels         = null
  ssh_local_tunnels          = null
  ssh_public_key             = null
  ssh_private_key            = null
}
```

This is a good first step for #9015 and #9282 

fix #9304
2020-05-28 11:19:00 +02: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
Lane, Larry e6670fc4a0 fix arg order 2020-05-21 21:15:13 -05:00
Sylvia Moss 1c30a71d09
Replace file shared state by statebag (#9238) 2020-05-19 11:49:48 +02:00
Adrien Delorme 840e67f775
HCL2: when we see a map generate an attribute spec instead of a block spec (#9035)
* mapstructure-to-hcl2: when we see a map generate an attribute spec and not a block spec

this will alow to do

tags = {
 key = "value"
}

instead of

tags {
  key = "value"
}

This will also enable using variables directly for those tags

* generate code

* update tests
2020-04-14 16:05:13 +02: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 91906b688c regenerate code 2020-04-01 11:37:25 -07:00
Megan Marsh 73c87044fd fix tests 2020-04-01 11:31:48 -07:00
Megan Marsh 64b706983e docs and cleanup 2020-04-01 11:31:48 -07:00
Megan Marsh d45ffe73d0 fix default ssh-extra-args flag 2020-04-01 11:31:48 -07:00
Megan Marsh d57809bcda pass ansible_password on command line instead of inside inventory file 2020-04-01 11:31:48 -07:00