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

packer v1.5.4: HCL対応 #39

Merged
merged 4 commits into from
Mar 10, 2020
Merged

Conversation

yamamoto-febc
Copy link
Member

fixes #34

Packerのバージョンを1.5系にし、HCL対応を行う。

HCLの例:

locals {
  password = "put-your-password-here"
}

source "sakuracloud" "example" {
  zone = "is1b"

  os_type   = "ubuntu"
  user_name = "ubuntu"
  password  = local.password

  core        = 2
  memory_size = 4

  archive_name        = "packer-example-ubuntu"
  archive_description = "description of archive"
}

build {
  sources = [
    "source.sakuracloud.example"
  ]
  provisioner "shell" {
    execute_command = "echo '${local.password}' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'"
    inline = [
      "apt update -y",
      "apt install -y curl"
    ]
  }
}

@yamamoto-febc
Copy link
Member Author

rebased

@yamamoto-febc yamamoto-febc merged commit 2bcdc9a into sacloud:master Mar 10, 2020
@yamamoto-febc yamamoto-febc deleted the feature/hcl branch March 10, 2020 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HCL2テンプレートへの対応
1 participant