Advertisement
Guest User

Untitled

a guest
Oct 9th, 2015
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 1.85 KB | None | 0 0
  1.     "provisioners": [
  2.         {
  3.             "type": "file",
  4.             "source": "files/partition.sh",
  5.             "destination": "/tmp/partition.sh"
  6.         },
  7.         {
  8.             "type": "shell",
  9.             "inline": [
  10.                 "#!/bin/bash -x",
  11.                 "sudo apt-get update",
  12.                 "sudo apt-get dist-upgrade -y",
  13.                 "sudo apt-get update",
  14.                 "sudo apt-get install lvm2 rsync -y",
  15.                 "sudo mv /tmp/partition.sh /opt/partition.sh",
  16.                 "sudo chmod a+x /opt/partition.sh",
  17.                 "sudo -E /opt/partition.sh",
  18.                 "sudo rm /opt/partition.sh"
  19.             ]
  20.         },
  21.         {
  22.             "type": "file",
  23.             "source": "files/ubuntu_ami.sh",
  24.             "destination": "/tmp/ubuntu_ami.sh"
  25.         },
  26.         {
  27.             "type": "shell",
  28.             "inline": [
  29.                 "#!/bin/bash -x",
  30.                 "sudo mv /tmp/ubuntu_ami.sh /opt/ubuntu_ami.sh",
  31.                 "sudo chmod a+x /opt/ubuntu_ami.sh",
  32.                 "sudo /opt/ubuntu_ami.sh",
  33.                 "sudo rm /opt/ubuntu_ami.sh"
  34.             ]
  35.         },
  36.         {
  37.             "type": "shell",
  38.             "inline": [
  39.                 "#!/bin/bash -x",
  40.                 "echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections",
  41.                 "sudo apt-add-repository ppa:webupd8team/java -y",
  42.                 "sudo apt-get update -y",
  43.                 "sudo apt-get install oracle-java7-installer -y"
  44.             ],
  45.             "only": ["ubuntu_infra_vagrant_java"]
  46.         }
  47.  
  48.     ],
  49.     "post-processors": [
  50.         {
  51.             "type": "vagrant",
  52.             "output": "packer_{{.BuildName}}_{{.Provider}}.box",
  53.             "only": ["ubuntu_infra_vagrant_java", "ubuntu_infra_vagrant"]
  54.         }
  55.     ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement