epas 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -1,6 +1,6 @@
1
1
  = epas
2
2
 
3
- The <b>epas<b> acronym stands for EC2 Puppet Auto Signer.
3
+ The <b>epas</b> acronym stands for EC2 Puppet Auto Signer.
4
4
 
5
5
  This gem provides a simple script to autosign ec2 instances into puppet. This way you can launch new instances in ec2 and avoid having to sign them manually.
6
6
 
@@ -31,12 +31,12 @@ Example contents of "~/.awssecret":
31
31
  You can also pass another file as an argument:
32
32
 
33
33
  # Example cron job 1.
34
- * * * * * ec2-puppet-autosigner /path/to/aws_credentials
34
+ * * * * * /bin/bash -l -c '/usr/local/bin/ec2-puppet-autosigner /path/to/aws_credentials'
35
35
 
36
36
  By defaults it checks all avaliable regions, but you can also pass the regions you want to check as parameters:
37
37
 
38
38
  # Example cron job 2.
39
- * * * * * ec2-puppet-autosigner /path/to/aws_credentials eu-west-1 us-east-1
39
+ * * * * * /bin/bash -l -c '/usr/local/bin/ec2-puppet-autosigner /path/to/aws_credentials eu-west-1 us-east-1'
40
40
 
41
41
  == Contributing to epas
42
42
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.3.0
@@ -11,4 +11,5 @@ credentials_file = ARGV[0] || "~/.awssecret"
11
11
  ec2_regions = ARGV.drop(1)
12
12
 
13
13
  # TODO: Add proper command line arguments handling
14
- Epas::AutoSigner.new(credentials_file, ec2_regions)
14
+ epas = Epas::AutoSigner.new(credentials_file, ec2_regions)
15
+ epas.sign_ec2_instance_requests!
data/epas.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{epas}
8
- s.version = "0.2.0"
8
+ s.version = "0.3.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ramon Salvad\303\263"]
data/lib/epas.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require 'active_support/core_ext/object/blank'
2
2
  require 'active_support/core_ext/kernel/reporting'
3
+ require 'aws'
3
4
 
4
5
  module Epas
5
6
 
@@ -19,10 +20,10 @@ module Epas
19
20
  #
20
21
  # Epas::Autosigner.new
21
22
  # Epas::AutoSigner.new myfile, [ 'eu-west-1', 'eu-east-1']
22
- def initialize(file = "~/.awssecret", regions = nil)
23
+ def initialize(file = "~/.awssecret", regions = [])
23
24
  raise UnavailablePuppet unless command?('puppet') && command?('puppetca')
24
25
  @aws_id, @aws_key = read_aws_credentials(file)
25
- @regions = regions || get_all_ec2_regions
26
+ @regions = regions.blank? ? get_all_ec2_regions : regions
26
27
  @awaiting_sign_instances = get_awaiting_sign_instances
27
28
  end
28
29
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: epas
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 2
8
+ - 3
9
9
  - 0
10
- version: 0.2.0
10
+ version: 0.3.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Ramon Salvad\xC3\xB3"