Class: AmazonWebServices

Inherits:
Object
  • Object
show all
Includes:
VagrantPlugins::Conductor::Module
Defined in:
lib/vagrant/conductor/modules/aws/aws.rb

Instance Attribute Summary

Attributes included from VagrantPlugins::Conductor::Module

#args, #config, #scripts, #templates

Instance Method Summary collapse

Methods included from VagrantPlugins::Conductor::Module

#generate_template, #initialize, #shell_provision

Instance Method Details

#create(profiles, template_file) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/vagrant/conductor/modules/aws/aws.rb', line 11

def create(profiles, template_file)
  result = generate_template(profiles, template_file)
  # Add template to vagrant home directory
  shell_provision(
      "bash #{@scripts}/awsconfig.sh \"$1\" $2",
      [result, template_file]
  )
end

#create_profilesObject



5
6
7
8
9
# File 'lib/vagrant/conductor/modules/aws/aws.rb', line 5

def create_profiles
  profiles = args.find?('profiles', [])
  create(profiles, "credentials")
  create(profiles, "config")
end

#install_aws_cliObject



20
21
22
# File 'lib/vagrant/conductor/modules/aws/aws.rb', line 20

def install_aws_cli

end

#install_eb_cliObject



24
25
26
27
28
# File 'lib/vagrant/conductor/modules/aws/aws.rb', line 24

def install_eb_cli
  shell_provision(
      "bash #{@scripts}/elasticbeanstalk.sh"
  )
end

#provisionObject



30
31
32
33
34
35
36
# File 'lib/vagrant/conductor/modules/aws/aws.rb', line 30

def provision

  if args.find?('install', false)
    shell_provision("bash #{@scripts}/awscli.sh", nil, true)
  end

end