Created
January 29, 2018 13:43
-
-
Save beneshed/10d3d25ee61c04d0ba3809a6b85498ea to your computer and use it in GitHub Desktop.
packer build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"builders": [{ | |
"type": "amazon-ebs", | |
"region": "us-east-1", | |
"source_ami": "ami-05e0b57f", | |
"instance_type": "t2.medium", | |
"ssh_username": "burrito", | |
"ssh_timeout": "15m", | |
"ami_name": "base-image16-pci-{{isotime | clean_ami_name}}", | |
"iam_instance_profile": "packer", | |
"user_data_file": "ubuntu/user_data16.sh", | |
"tags": { | |
"Keep": "yes" | |
} | |
}], | |
"provisioners": [{ | |
"type": "shell", | |
"execute_command": "{{ .Vars }} bash '{{ .Path }}'", | |
"scripts": [ | |
"ubuntu/prepare_copy_files.sh" | |
] | |
}, | |
{ "type": "file", "source": "ubuntu/", "destination": "/opt/forter" }, | |
{ "type": "file", "source": "forter/", "destination": "/opt/forter" }, | |
{ | |
"type": "shell", | |
"pause_before": "1m", | |
"execute_command": "cd /opt/forter; {{ .Vars }} bash '{{ .Path }}'", | |
"scripts": [ | |
"ubuntu/install16.sh" | |
] | |
}, | |
{ | |
"type": "shell", | |
"execute_command": "cd /opt/forter; {{ .Vars }} bash '{{ .Path }}'", | |
"environment_vars": ["PLAYBOOK=base"], | |
"scripts": [ | |
"ubuntu/install_run_ansible.sh", | |
"ubuntu/cleanup.sh" | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment