chef cookbooks
source "https://api.berkshelf.com"
cookbook 'build-essential', '~> 2.0.6'
cookbook 'sudo', '~> 2.7.0'
cookbook 'users', '~> 1.7.0'
cookbook 'chef-solo-search', '~> 0.5.1'
cookbook 'sshd', '~> 1.1.0'
cookbook 'fail2ban', '~> 2.2.0'
cookbook 'ufw', '~> 0.7.4'
cookbook 'apt-periodic', '~> 0.2.0'
source "https://ruby.taobao.org"
gem "knife-solo"
gem "chef"
gem "berkshelf"
{
"id": "deploy",
"password": "$1$IYaI2C7l$S37uGtAoFNgfVYYXzNkfV0",
"ssh_keys": [
"ssh-rsa AAA..........ACH test@local"
],
"groups": [ "sysadmin"],
"shell": "\/bin\/bash"
}
{
"run_list": [
"role[server]"
],
"automatic": {
"ipaddress": "117.121.26.11"
}
}
{
"name": "server",
"description": "",
"json_class": "Chef::Role",
"default_attributes": {
"authorization": {
"sudo": {
"groups": ["sysadmin"],
"users": ["deploy"],
"passwordless": false
}
},
"sshd": {
"sshd_config": {
"PasswordAuthentication": "no",
"X11Forwarding": "no",
"UsePAM": "no",
"PermitRootLogin": "no"
}
}
},
"override_attributes": {
"firewall": {
"rules": [
{
"http": { "port": 80 },
"https": { "port": 443 }
}
]
}
},
"chef_type": "role",
"run_list": [
"build-essential",
"chef-solo-search",
"users::sysadmins",
"sudo",
"sshd",
"fail2ban",
"ufw",
"apt-periodic"
],
"env_run_lists": {
}
}