2013-09-29 17:54:49 -04:00
|
|
|
package ansiblelocal
|
|
|
|
|
|
|
|
import (
|
2019-03-19 13:11:19 -04:00
|
|
|
"context"
|
2013-09-29 17:54:49 -04:00
|
|
|
"io/ioutil"
|
|
|
|
"os"
|
2017-02-06 14:29:39 -05:00
|
|
|
"path/filepath"
|
2017-02-03 18:03:19 -05:00
|
|
|
"strings"
|
2013-09-29 17:54:49 -04:00
|
|
|
"testing"
|
2017-02-03 18:03:19 -05:00
|
|
|
|
2017-07-03 17:44:10 -04:00
|
|
|
"fmt"
|
2018-09-06 09:52:28 -04:00
|
|
|
"os/exec"
|
|
|
|
|
2021-02-24 19:32:27 -05:00
|
|
|
"github.com/hashicorp/packer-plugin-docker/builder/docker"
|
2020-12-17 16:29:25 -05:00
|
|
|
builderT "github.com/hashicorp/packer-plugin-sdk/acctest"
|
|
|
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
2017-07-10 02:19:29 -04:00
|
|
|
"github.com/hashicorp/packer/provisioner/file"
|
2013-09-29 17:54:49 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestProvisioner_Impl(t *testing.T) {
|
|
|
|
var raw interface{}
|
|
|
|
raw = &Provisioner{}
|
2020-12-01 17:25:14 -05:00
|
|
|
if _, ok := raw.(packersdk.Provisioner); !ok {
|
2013-09-29 17:54:49 -04:00
|
|
|
t.Fatalf("must be a Provisioner")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-09-29 18:44:21 -04:00
|
|
|
func TestProvisionerPrepare_Defaults(t *testing.T) {
|
|
|
|
var p Provisioner
|
|
|
|
config := testConfig()
|
|
|
|
|
|
|
|
playbook_file, err := ioutil.TempFile("", "playbook")
|
|
|
|
if err != nil {
|
|
|
|
t.Fatalf("err: %s", err)
|
|
|
|
}
|
|
|
|
defer os.Remove(playbook_file.Name())
|
|
|
|
|
|
|
|
config["playbook_file"] = playbook_file.Name()
|
|
|
|
err = p.Prepare(config)
|
|
|
|
if err != nil {
|
|
|
|
t.Fatalf("err: %s", err)
|
|
|
|
}
|
|
|
|
|
2017-02-06 14:29:39 -05:00
|
|
|
if !strings.HasPrefix(filepath.ToSlash(p.config.StagingDir), DefaultStagingDir) {
|
2013-09-29 18:44:21 -04:00
|
|
|
t.Fatalf("unexpected staging dir %s, expected %s",
|
|
|
|
p.config.StagingDir, DefaultStagingDir)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-09-29 17:54:49 -04:00
|
|
|
func TestProvisionerPrepare_PlaybookFile(t *testing.T) {
|
|
|
|
var p Provisioner
|
|
|
|
config := testConfig()
|
|
|
|
|
|
|
|
err := p.Prepare(config)
|
|
|
|
if err == nil {
|
|
|
|
t.Fatal("should have error")
|
|
|
|
}
|
|
|
|
|
|
|
|
config["playbook_file"] = ""
|
|
|
|
err = p.Prepare(config)
|
|
|
|
if err == nil {
|
|
|
|
t.Fatal("should have error")
|
|
|
|
}
|
|
|
|
|
|
|
|
playbook_file, err := ioutil.TempFile("", "playbook")
|
|
|
|
if err != nil {
|
|
|
|
t.Fatalf("err: %s", err)
|
|
|
|
}
|
|
|
|
defer os.Remove(playbook_file.Name())
|
|
|
|
|
|
|
|
config["playbook_file"] = playbook_file.Name()
|
|
|
|
err = p.Prepare(config)
|
|
|
|
if err != nil {
|
|
|
|
t.Fatalf("err: %s", err)
|
|
|
|
}
|
|
|
|
}
|
2013-12-12 15:13:23 -05:00
|
|
|
|
2017-06-28 06:33:53 -04:00
|
|
|
func TestProvisionerPrepare_PlaybookFiles(t *testing.T) {
|
|
|
|
var p Provisioner
|
|
|
|
config := testConfig()
|
|
|
|
|
|
|
|
err := p.Prepare(config)
|
|
|
|
if err == nil {
|
|
|
|
t.Fatal("should have error")
|
|
|
|
}
|
|
|
|
|
|
|
|
config["playbook_file"] = ""
|
|
|
|
config["playbook_files"] = []string{}
|
|
|
|
err = p.Prepare(config)
|
|
|
|
if err == nil {
|
|
|
|
t.Fatal("should have error")
|
|
|
|
}
|
|
|
|
|
|
|
|
playbook_file, err := ioutil.TempFile("", "playbook")
|
|
|
|
if err != nil {
|
|
|
|
t.Fatalf("err: %s", err)
|
|
|
|
}
|
|
|
|
defer os.Remove(playbook_file.Name())
|
|
|
|
|
|
|
|
config["playbook_file"] = playbook_file.Name()
|
|
|
|
config["playbook_files"] = []string{"some_other_file"}
|
|
|
|
err = p.Prepare(config)
|
|
|
|
if err == nil {
|
|
|
|
t.Fatal("should have error")
|
|
|
|
}
|
|
|
|
|
2018-05-16 16:43:30 -04:00
|
|
|
p = Provisioner{}
|
2017-06-28 06:33:53 -04:00
|
|
|
config["playbook_file"] = playbook_file.Name()
|
|
|
|
config["playbook_files"] = []string{}
|
|
|
|
err = p.Prepare(config)
|
|
|
|
if err != nil {
|
|
|
|
t.Fatalf("err: %s", err)
|
|
|
|
}
|
|
|
|
|
|
|
|
config["playbook_file"] = ""
|
|
|
|
config["playbook_files"] = []string{playbook_file.Name()}
|
|
|
|
err = p.Prepare(config)
|
|
|
|
if err != nil {
|
|
|
|
t.Fatalf("err: %s", err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-07-03 17:44:10 -04:00
|
|
|
func TestProvisionerProvision_PlaybookFiles(t *testing.T) {
|
|
|
|
var p Provisioner
|
|
|
|
config := testConfig()
|
|
|
|
|
2017-07-10 15:58:46 -04:00
|
|
|
playbooks := createTempFiles("", 3)
|
2017-07-03 17:44:10 -04:00
|
|
|
defer removeFiles(playbooks...)
|
|
|
|
|
|
|
|
config["playbook_files"] = playbooks
|
|
|
|
err := p.Prepare(config)
|
|
|
|
if err != nil {
|
|
|
|
t.Fatalf("err: %s", err)
|
|
|
|
}
|
|
|
|
|
|
|
|
comm := &communicatorMock{}
|
2020-12-03 19:32:42 -05:00
|
|
|
if err := p.Provision(context.Background(), packersdk.TestUi(t), comm, make(map[string]interface{})); err != nil {
|
2017-07-03 17:44:10 -04:00
|
|
|
t.Fatalf("err: %s", err)
|
|
|
|
}
|
|
|
|
|
|
|
|
assertPlaybooksUploaded(comm, playbooks)
|
|
|
|
assertPlaybooksExecuted(comm, playbooks)
|
|
|
|
}
|
|
|
|
|
2017-07-10 15:58:46 -04:00
|
|
|
func TestProvisionerProvision_PlaybookFilesWithPlaybookDir(t *testing.T) {
|
|
|
|
var p Provisioner
|
|
|
|
config := testConfig()
|
|
|
|
|
2017-07-10 16:05:42 -04:00
|
|
|
playbook_dir, err := ioutil.TempDir("", "")
|
2017-07-10 15:58:46 -04:00
|
|
|
if err != nil {
|
|
|
|
t.Fatalf("Failed to create playbook_dir: %s", err)
|
|
|
|
}
|
|
|
|
defer os.RemoveAll(playbook_dir)
|
|
|
|
playbooks := createTempFiles(playbook_dir, 3)
|
|
|
|
|
|
|
|
playbookNames := make([]string, 0, len(playbooks))
|
|
|
|
playbooksInPlaybookDir := make([]string, 0, len(playbooks))
|
|
|
|
for _, playbook := range playbooks {
|
|
|
|
playbooksInPlaybookDir = append(playbooksInPlaybookDir, strings.TrimPrefix(playbook, playbook_dir))
|
|
|
|
playbookNames = append(playbookNames, filepath.Base(playbook))
|
|
|
|
}
|
|
|
|
|
|
|
|
config["playbook_files"] = playbooks
|
|
|
|
config["playbook_dir"] = playbook_dir
|
|
|
|
err = p.Prepare(config)
|
|
|
|
if err != nil {
|
|
|
|
t.Fatalf("err: %s", err)
|
|
|
|
}
|
|
|
|
|
|
|
|
comm := &communicatorMock{}
|
2020-12-03 19:32:42 -05:00
|
|
|
if err := p.Provision(context.Background(), packersdk.TestUi(t), comm, make(map[string]interface{})); err != nil {
|
2017-07-10 15:58:46 -04:00
|
|
|
t.Fatalf("err: %s", err)
|
|
|
|
}
|
|
|
|
|
|
|
|
assertPlaybooksNotUploaded(comm, playbookNames)
|
|
|
|
assertPlaybooksExecuted(comm, playbooksInPlaybookDir)
|
|
|
|
}
|
|
|
|
|
2014-04-04 14:19:55 -04:00
|
|
|
func TestProvisionerPrepare_InventoryFile(t *testing.T) {
|
|
|
|
var p Provisioner
|
|
|
|
config := testConfig()
|
|
|
|
|
|
|
|
err := p.Prepare(config)
|
|
|
|
if err == nil {
|
|
|
|
t.Fatal("should have error")
|
|
|
|
}
|
|
|
|
|
|
|
|
config["playbook_file"] = ""
|
|
|
|
err = p.Prepare(config)
|
|
|
|
if err == nil {
|
|
|
|
t.Fatal("should have error")
|
|
|
|
}
|
|
|
|
|
|
|
|
playbook_file, err := ioutil.TempFile("", "playbook")
|
|
|
|
if err != nil {
|
|
|
|
t.Fatalf("err: %s", err)
|
|
|
|
}
|
|
|
|
defer os.Remove(playbook_file.Name())
|
|
|
|
|
|
|
|
config["playbook_file"] = playbook_file.Name()
|
|
|
|
err = p.Prepare(config)
|
|
|
|
if err != nil {
|
|
|
|
t.Fatalf("err: %s", err)
|
|
|
|
}
|
|
|
|
|
|
|
|
inventory_file, err := ioutil.TempFile("", "inventory")
|
|
|
|
if err != nil {
|
|
|
|
t.Fatalf("err: %s", err)
|
|
|
|
}
|
|
|
|
defer os.Remove(inventory_file.Name())
|
|
|
|
|
|
|
|
config["inventory_file"] = inventory_file.Name()
|
|
|
|
err = p.Prepare(config)
|
|
|
|
if err != nil {
|
|
|
|
t.Fatalf("err: %s", err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-12-12 15:13:23 -05:00
|
|
|
func TestProvisionerPrepare_Dirs(t *testing.T) {
|
|
|
|
var p Provisioner
|
|
|
|
config := testConfig()
|
|
|
|
|
|
|
|
err := p.Prepare(config)
|
|
|
|
if err == nil {
|
|
|
|
t.Fatal("should have error")
|
|
|
|
}
|
|
|
|
|
|
|
|
config["playbook_file"] = ""
|
|
|
|
err = p.Prepare(config)
|
|
|
|
if err == nil {
|
|
|
|
t.Fatal("should have error")
|
|
|
|
}
|
|
|
|
|
|
|
|
playbook_file, err := ioutil.TempFile("", "playbook")
|
|
|
|
if err != nil {
|
|
|
|
t.Fatalf("err: %s", err)
|
|
|
|
}
|
|
|
|
defer os.Remove(playbook_file.Name())
|
|
|
|
|
|
|
|
config["playbook_file"] = playbook_file.Name()
|
|
|
|
err = p.Prepare(config)
|
|
|
|
if err != nil {
|
|
|
|
t.Fatalf("err: %s", err)
|
|
|
|
}
|
|
|
|
|
|
|
|
config["playbook_paths"] = []string{playbook_file.Name()}
|
|
|
|
err = p.Prepare(config)
|
|
|
|
if err == nil {
|
|
|
|
t.Fatal("should error if playbook paths is not a dir")
|
|
|
|
}
|
|
|
|
|
|
|
|
config["playbook_paths"] = []string{os.TempDir()}
|
|
|
|
err = p.Prepare(config)
|
|
|
|
if err != nil {
|
|
|
|
t.Fatalf("err: %s", err)
|
|
|
|
}
|
|
|
|
|
|
|
|
config["role_paths"] = []string{playbook_file.Name()}
|
|
|
|
err = p.Prepare(config)
|
|
|
|
if err == nil {
|
|
|
|
t.Fatal("should error if role paths is not a dir")
|
|
|
|
}
|
|
|
|
|
|
|
|
config["role_paths"] = []string{os.TempDir()}
|
|
|
|
err = p.Prepare(config)
|
|
|
|
if err != nil {
|
|
|
|
t.Fatalf("err: %s", err)
|
|
|
|
}
|
2014-01-18 21:48:12 -05:00
|
|
|
|
|
|
|
config["group_vars"] = playbook_file.Name()
|
|
|
|
err = p.Prepare(config)
|
|
|
|
if err == nil {
|
|
|
|
t.Fatalf("should error if group_vars path is not a dir")
|
|
|
|
}
|
|
|
|
|
|
|
|
config["group_vars"] = os.TempDir()
|
|
|
|
err = p.Prepare(config)
|
|
|
|
if err != nil {
|
|
|
|
t.Fatalf("err: %s", err)
|
|
|
|
}
|
|
|
|
|
|
|
|
config["host_vars"] = playbook_file.Name()
|
|
|
|
err = p.Prepare(config)
|
|
|
|
if err == nil {
|
|
|
|
t.Fatalf("should error if host_vars path is not a dir")
|
|
|
|
}
|
|
|
|
|
|
|
|
config["host_vars"] = os.TempDir()
|
|
|
|
err = p.Prepare(config)
|
|
|
|
if err != nil {
|
|
|
|
t.Fatalf("err: %s", err)
|
|
|
|
}
|
2013-12-12 15:13:23 -05:00
|
|
|
}
|
2017-07-10 02:19:29 -04:00
|
|
|
|
2017-11-21 15:09:01 -05:00
|
|
|
func TestProvisionerPrepare_CleanStagingDir(t *testing.T) {
|
|
|
|
var p Provisioner
|
|
|
|
config := testConfig()
|
|
|
|
|
|
|
|
playbook_file, err := ioutil.TempFile("", "playbook")
|
|
|
|
if err != nil {
|
|
|
|
t.Fatalf("err: %s", err)
|
|
|
|
}
|
|
|
|
defer os.Remove(playbook_file.Name())
|
|
|
|
|
|
|
|
config["playbook_file"] = playbook_file.Name()
|
|
|
|
config["clean_staging_directory"] = true
|
|
|
|
|
|
|
|
err = p.Prepare(config)
|
|
|
|
if err != nil {
|
|
|
|
t.Fatalf("err: %s", err)
|
|
|
|
}
|
|
|
|
|
|
|
|
if !p.config.CleanStagingDir {
|
|
|
|
t.Fatalf("expected clean_staging_directory to be set")
|
|
|
|
}
|
|
|
|
}
|
2018-05-16 16:14:12 -04:00
|
|
|
|
2017-07-10 02:19:29 -04:00
|
|
|
func TestProvisionerProvisionDocker_PlaybookFiles(t *testing.T) {
|
2017-07-10 15:58:46 -04:00
|
|
|
testProvisionerProvisionDockerWithPlaybookFiles(t, playbookFilesDockerTemplate)
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestProvisionerProvisionDocker_PlaybookFilesWithPlaybookDir(t *testing.T) {
|
|
|
|
testProvisionerProvisionDockerWithPlaybookFiles(t, playbookFilesWithPlaybookDirDockerTemplate)
|
|
|
|
}
|
|
|
|
|
|
|
|
func testProvisionerProvisionDockerWithPlaybookFiles(t *testing.T, templateString string) {
|
2017-07-10 02:19:29 -04:00
|
|
|
if os.Getenv("PACKER_ACC") == "" {
|
|
|
|
t.Skip("This test is only run with PACKER_ACC=1")
|
|
|
|
}
|
|
|
|
|
2020-12-03 20:01:10 -05:00
|
|
|
// this should be a precheck
|
|
|
|
cmd := exec.Command("docker", "-v")
|
|
|
|
err := cmd.Run()
|
2017-07-10 02:19:29 -04:00
|
|
|
if err != nil {
|
|
|
|
t.Error("docker command not found; please make sure docker is installed")
|
|
|
|
}
|
|
|
|
|
2020-12-03 20:01:10 -05:00
|
|
|
builderT.Test(t, builderT.TestCase{
|
|
|
|
Builder: &docker.Builder{},
|
|
|
|
Template: templateString,
|
|
|
|
Check: func(a []packersdk.Artifact) error {
|
2017-07-10 02:19:29 -04:00
|
|
|
|
2020-12-03 20:01:10 -05:00
|
|
|
actualContent, err := ioutil.ReadFile("hello_world")
|
|
|
|
if err != nil {
|
|
|
|
return fmt.Errorf("Expected file not found: %s", err)
|
|
|
|
}
|
2017-07-10 02:19:29 -04:00
|
|
|
|
2020-12-03 20:01:10 -05:00
|
|
|
expectedContent := "Hello world!"
|
|
|
|
if string(actualContent) != expectedContent {
|
|
|
|
return fmt.Errorf(`Unexpected file content: expected="%s", actual="%s"`, expectedContent, actualContent)
|
|
|
|
}
|
|
|
|
return nil
|
2017-07-10 02:19:29 -04:00
|
|
|
},
|
2020-12-03 20:01:10 -05:00
|
|
|
Teardown: func() error {
|
|
|
|
os.Remove("hello_world")
|
|
|
|
return nil
|
|
|
|
},
|
|
|
|
ProvisionerStore: packersdk.MapOfProvisioner{
|
|
|
|
"ansible-local": func() (packersdk.Provisioner, error) { return &Provisioner{}, nil },
|
|
|
|
"file": func() (packersdk.Provisioner, error) { return &file.Provisioner{}, nil },
|
|
|
|
},
|
|
|
|
})
|
2017-07-10 02:19:29 -04:00
|
|
|
}
|
|
|
|
|
2017-07-10 15:58:46 -04:00
|
|
|
func assertPlaybooksExecuted(comm *communicatorMock, playbooks []string) {
|
|
|
|
cmdIndex := 0
|
|
|
|
for _, playbook := range playbooks {
|
|
|
|
playbook = filepath.ToSlash(playbook)
|
|
|
|
for ; cmdIndex < len(comm.startCommand); cmdIndex++ {
|
|
|
|
cmd := comm.startCommand[cmdIndex]
|
|
|
|
if strings.Contains(cmd, "ansible-playbook") && strings.Contains(cmd, playbook) {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if cmdIndex == len(comm.startCommand) {
|
|
|
|
panic(fmt.Sprintf("Playbook %s was not executed", playbook))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func assertPlaybooksUploaded(comm *communicatorMock, playbooks []string) {
|
|
|
|
uploadIndex := 0
|
|
|
|
for _, playbook := range playbooks {
|
|
|
|
playbook = filepath.ToSlash(playbook)
|
|
|
|
for ; uploadIndex < len(comm.uploadDestination); uploadIndex++ {
|
|
|
|
dest := comm.uploadDestination[uploadIndex]
|
|
|
|
if strings.HasSuffix(dest, playbook) {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if uploadIndex == len(comm.uploadDestination) {
|
|
|
|
panic(fmt.Sprintf("Playbook %s was not uploaded", playbook))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func assertPlaybooksNotUploaded(comm *communicatorMock, playbooks []string) {
|
|
|
|
for _, playbook := range playbooks {
|
|
|
|
playbook = filepath.ToSlash(playbook)
|
|
|
|
for _, destination := range comm.uploadDestination {
|
|
|
|
if strings.HasSuffix(destination, playbook) {
|
|
|
|
panic(fmt.Sprintf("Playbook %s was uploaded", playbook))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-07-10 02:19:29 -04:00
|
|
|
func testConfig() map[string]interface{} {
|
|
|
|
m := make(map[string]interface{})
|
|
|
|
return m
|
|
|
|
}
|
|
|
|
|
2017-07-10 15:58:46 -04:00
|
|
|
func createTempFile(dir string) string {
|
|
|
|
file, err := ioutil.TempFile(dir, "")
|
2017-07-10 02:19:29 -04:00
|
|
|
if err != nil {
|
|
|
|
panic(fmt.Sprintf("err: %s", err))
|
|
|
|
}
|
|
|
|
return file.Name()
|
|
|
|
}
|
|
|
|
|
2017-07-10 15:58:46 -04:00
|
|
|
func createTempFiles(dir string, numFiles int) []string {
|
2017-07-10 02:19:29 -04:00
|
|
|
files := make([]string, 0, numFiles)
|
|
|
|
defer func() {
|
|
|
|
// Cleanup the files if not all were created.
|
|
|
|
if len(files) < numFiles {
|
|
|
|
for _, file := range files {
|
|
|
|
os.Remove(file)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
|
|
|
for i := 0; i < numFiles; i++ {
|
2017-07-10 15:58:46 -04:00
|
|
|
files = append(files, createTempFile(dir))
|
2017-07-10 02:19:29 -04:00
|
|
|
}
|
|
|
|
return files
|
|
|
|
}
|
|
|
|
|
|
|
|
func removeFiles(files ...string) {
|
|
|
|
for _, file := range files {
|
|
|
|
os.Remove(file)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-07-10 15:58:46 -04:00
|
|
|
const playbookFilesDockerTemplate = `
|
2017-07-10 02:19:29 -04:00
|
|
|
{
|
|
|
|
"builders": [
|
|
|
|
{
|
2020-12-03 20:01:10 -05:00
|
|
|
"type": "test",
|
2017-07-10 02:19:29 -04:00
|
|
|
"image": "williamyeh/ansible:centos7",
|
|
|
|
"discard": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"provisioners": [
|
|
|
|
{
|
|
|
|
"type": "ansible-local",
|
|
|
|
"playbook_files": [
|
|
|
|
"test-fixtures/hello.yml",
|
|
|
|
"test-fixtures/world.yml"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "file",
|
|
|
|
"source": "/tmp/hello_world",
|
|
|
|
"destination": "hello_world",
|
|
|
|
"direction": "download"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
`
|
2017-07-10 15:58:46 -04:00
|
|
|
|
|
|
|
const playbookFilesWithPlaybookDirDockerTemplate = `
|
|
|
|
{
|
|
|
|
"builders": [
|
|
|
|
{
|
2020-12-03 20:01:10 -05:00
|
|
|
"type": "test",
|
2017-07-10 15:58:46 -04:00
|
|
|
"image": "williamyeh/ansible:centos7",
|
|
|
|
"discard": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"provisioners": [
|
|
|
|
{
|
|
|
|
"type": "ansible-local",
|
|
|
|
"playbook_files": [
|
|
|
|
"test-fixtures/hello.yml",
|
|
|
|
"test-fixtures/world.yml"
|
|
|
|
],
|
|
|
|
"playbook_dir": "test-fixtures"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "file",
|
|
|
|
"source": "/tmp/hello_world",
|
|
|
|
"destination": "hello_world",
|
|
|
|
"direction": "download"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
`
|