Skip to content

Commit

Permalink
fix base64encode example
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxtof committed Aug 2, 2023
1 parent 8098381 commit 46333c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/builders/nutanix.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ These parameters allow to configure everything around image creation, from the t
- `communicator` (string) - Protocol used for Packer connection (ex "winrm" or "ssh"). Default is : "ssh".

### Dedicated to Linux
- `user_data` (string) - cloud-init content base64 coded.
- `user_data` (string) - cloud-init content base64 encoded.
- `ssh_username` (string) - user for ssh connection initiated by Packer.
- `ssh_password` (string) - password for the ssh user.

Expand Down
4 changes: 2 additions & 2 deletions example/source.nutanix.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ source "nutanix" "centos" {
image_name = "centos-packer-image"
image_export = false
force_deregister = true
user_data = base64encode("scripts/cloud-init/cloud-config-centos.yaml")
user_data = base64encode(file("scripts/cloud-init/cloud-config-centos.yaml"))

shutdown_command = "echo 'packer' | sudo -S shutdown -P now"
shutdown_timeout = "2m"
Expand Down Expand Up @@ -59,7 +59,7 @@ source "nutanix" "ubuntu" {

image_name = "ubuntu-packer-image"
force_deregister = true
user_data = base64encode("scripts/cloud-init/cloud-config-ubuntu.yaml")
user_data = base64encode(file("scripts/cloud-init/cloud-config-ubuntu.yaml"))

shutdown_command = "echo 'packer' | sudo -S shutdown -P now"
shutdown_timeout = "2m"
Expand Down

0 comments on commit 46333c6

Please sign in to comment.