Module: Pot::DSL

Defined in:
lib/pot/dsl.rb

Overview

:nodoc: all

Instance Method Summary collapse

Instance Method Details

#deploy_packages(instances, packages, options = {}) ⇒ Object



28
29
30
31
# File 'lib/pot/dsl.rb', line 28

def deploy_packages(instances, packages, options = {})
  deployment = Pot::Deployment.new(options)
  deployment.deploy_packages_to_instances(packages, instances)
end

#deploy_policies(instances, policies, options = {}) ⇒ Object



23
24
25
26
# File 'lib/pot/dsl.rb', line 23

def deploy_policies(instances, policies, options = {})
  deployment = Pot::Deployment.new(options)
  deployment.deploy_policies_to_instances(policies, instances)
end

#deploy_roles(roles, options = {}) ⇒ Object



33
34
35
36
# File 'lib/pot/dsl.rb', line 33

def deploy_roles(roles, options = {})
  deployment = Pot::Deployment.new(options)
  deployment.deploy_roles(roles)
end

#instance(name, host, options = {}) ⇒ Object



7
8
9
# File 'lib/pot/dsl.rb', line 7

def instance(name, host, options = {})
  Pot::Instance.new(name, host, options)
end

#package(name, metadata = {}, &block) ⇒ Object



11
12
13
# File 'lib/pot/dsl.rb', line 11

def package(name,  = {}, &block)
  Pot::Package.new(name, , &block)
end

#policy(name, options = {}, &block) ⇒ Object



15
16
17
# File 'lib/pot/dsl.rb', line 15

def policy(name, options = {}, &block)
  Pot::Policy.new(name, options, &block)
end

#role(role_name, instance_name) ⇒ Object



19
20
21
# File 'lib/pot/dsl.rb', line 19

def role(role_name, instance_name)
  Pot::Role.new(role_name, instance_name)
end

#set(option, value) ⇒ Object



3
4
5
# File 'lib/pot/dsl.rb', line 3

def set(option, value)
  Pot::Config.instance.send("#{option}=", value)
end