github.com/inloco/packer@v1.3.2/examples/azure/rhel.json (about)

     1  {
     2    "variables": {
     3      "client_id": "{{env `ARM_CLIENT_ID`}}",
     4      "client_secret": "{{env `ARM_CLIENT_SECRET`}}",
     5      "subscription_id": "{{env `ARM_SUBSCRIPTION_ID`}}",
     6      "tenant_id": "{{env `ARM_TENANT_ID`}}",
     7      "ssh_user": "centos",
     8      "ssh_pass": "{{env `ARM_SSH_PASS`}}"
     9    },
    10    "builders": [{
    11      "type": "azure-arm",
    12  
    13      "client_id": "{{user `client_id`}}",
    14      "client_secret": "{{user `client_secret`}}",
    15      "subscription_id": "{{user `subscription_id`}}",
    16      "tenant_id": "{{user `tenant_id`}}",
    17  
    18      "managed_image_resource_group_name": "packertest",
    19      "managed_image_name": "MyRedHatOSImage",
    20  
    21  
    22      "ssh_username": "{{user `ssh_user`}}",
    23      "ssh_password": "{{user `ssh_pass`}}",
    24  
    25      "os_type": "Linux",
    26      "image_publisher": "RedHat",
    27      "image_offer": "RHEL",
    28      "image_sku": "7.3",
    29      "image_version": "latest",
    30      "ssh_pty": "true",
    31  
    32      "location": "South Central US",
    33      "vm_size": "Standard_DS2_v2"
    34    }],
    35    "provisioners": [{
    36      "execute_command": "echo '{{user `ssh_pass`}}' | {{ .Vars }} sudo -S -E sh '{{ .Path }}'",
    37      "inline": [
    38        "yum update -y",
    39        "/usr/sbin/waagent -force -deprovision+user && export HISTSIZE=0 && sync"
    40      ],
    41      "inline_shebang": "/bin/sh -x",
    42      "type": "shell",
    43      "skip_clean": true
    44    }]
    45  }