Puppet Class: r_profile::aws
- Defined in:
- manifests/aws.pp
Overview
R_profile::Aws
Configure AWS with puppet
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 38 39 40 41 42 |
# File 'manifests/aws.pp', line 4
class r_profile::aws(
$aws_access_key_id = hiera("r_profile::aws::aws_secret_key_id"),
$aws_secret_access_key = hiera("r_profile::aws::aws_secret_access_key"),
$ec2_instance = hiera("r_profile::aws::ec2_instance", {}),
$ec2_instance_default = hiera("r_profile::aws::ec2_instance_default", {}),
$ec2_securitygroup = hiera("r_profile::aws::ec2_securitygroup", {}),
$ec2_securitygroup_default = hiera("r_profile::aws::ec2_securitygroup_default", {}),
$elb_loadbalancer = hiera("r_profile::aws::elb_loadbalancer", {}),
$elb_loadbalancer_default = hiera("r_profile::aws::elb_loadbalancer_default", {}),
# ... add more later
) {
File {
owner => "root",
group => "root",
mode => "0600",
}
package { [ "aws-controlrepo", "retries", ]:
ensure => present,
provider => "puppet_gem",
}
file { "/root/.aws":
ensure => directory,
}
file { "/root/.aws/credentials":
ensure => file,
content => template("${module_name}/aws/credentials.erb"),
}
create_resources("ec2_instance", $ec2_instance, $ec2_instance_default)
create_resources("ec2_securitygroup", $ec2_securitygroup, $ec2_securitygroup_default)
create_resources("elb_loadbalancer", $elb_loadbalancer, $elb_loadbalancer_default)
}
|