-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcentos7.json
37 lines (37 loc) · 1.13 KB
/
centos7.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{
"variables": {
"maint_password_hash": "{{env `MAINT_PASSWORD_HASH`}}"
},
"builders": [
{
"type": "amazon-ebs",
"region": "us-east-1",
"instance_type": "t2.micro",
"source_ami": "ami-ae7bfdb8",
"ssh_username": "centos",
"ami_name": "wm-centos7-puppet4-{{isotime \"2006-01-02 (15_04_05)\"}}"
}
],
"provisioners": [
{
"type": "shell",
"inline": [
"sudo yum install -y wget",
"wget http://yum.puppetlabs.com/puppetlabs-release-pc1-el-7.noarch.rpm",
"sudo rpm -ivh puppetlabs-release-pc1-el-7.noarch.rpm",
"rm puppetlabs-release-pc1-el-7.noarch.rpm",
"sudo yum update -y",
"sudo yum install puppet-agent -y"
]
},
{
"type": "puppet-masterless",
"manifest_file": "puppet/redhat.pp",
"module_paths": ["puppet/modules/"],
"facter": {
"maint_password_hash": "{{user `maint_password_hash`}}"
},
"execute_command": "{{if .Sudo}} echo 'vagrant' | sudo -S -E {{end}}{{.FacterVars}} /opt/puppetlabs/bin/puppet apply --order=manifest --modulepath='{{.ModulePath}}' {{.ManifestFile}}"
}
]
}