{
  "variables": {
    "region": "{{env `region`}}",
    "environment": "{{env `env`}}",
    "lob": "{{env `lob`}}",
    "vpc_id": "{{env `vpc_id`}}",
    "subnet_id": "{{env `subnet_id`}}",
    "account": "{{env `account`}}",
    "role": "{{env `iam_instance_profile`}}",
    "kms_key": "{{env `kms_key_id`}}"
  },
  "builders": [
    {
      "type": "amazon-ebs",
      "region": "{{user `region`}}",
      "vpc_id": "{{user `vpc_id`}}",
      "subnet_id": "{{user `subnet_id`}}",
      "instance_type": "t2.medium",
      "source_ami_filter": {
        "filters": {
          "virtualization-type": "hvm",
          "name": "Windows_Server-2019-English-Full-Base-*",
          "root-device-type": "ebs"
        },
        "most_recent": true,
        "owners": "amazon"
      },
      "ami_name": "test-ansible-packer",
      "user_data_file": "scripts/user_data.txt",
      "communicator": "winrm",
      "force_deregister": true,
      "winrm_insecure": true,
      "winrm_username": "Administrator",
      "winrm_use_ssl": true,
      "iam_instance_profile": "{{user `role`}}",
      "skip_profile_validation" : true
    }
  ],
  "provisioners": [
    {
      "type": "ansible",
      "playbook_file": "./playbook.yml",
      "user": "Administrator",
      "use_proxy": false,
      "extra_arguments": ["-e", "ansible_winrm_server_cert_validation=ignore"]
    }
  ]
}
Here is my win2019.json file.

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/hashicorp/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/c40eed77-6990-4403-8bef-255ccda22790n%40googlegroups.com.

Reply via email to