Class: PEBuild::Provisioner::PEAgent
Overview
Provision PE agents using simplified install
Instance Attribute Summary collapse
Instance Method Summary
collapse
ensure_reachable, is_reachable?
platform_tag
Instance Attribute Details
#agent_version ⇒ Object
18
19
20
|
# File 'lib/pe_build/provisioner/pe_agent.rb', line 18
def agent_version
@agent_version
end
|
#facts ⇒ Object
17
18
19
|
# File 'lib/pe_build/provisioner/pe_agent.rb', line 17
def facts
@facts
end
|
#master_vm ⇒ Object
19
20
21
|
# File 'lib/pe_build/provisioner/pe_agent.rb', line 19
def master_vm
@master_vm
end
|
Instance Method Details
#cleanup ⇒ Object
This gets run during agent destruction and will remove the agent's
certificate from the master, if requested.
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
# File 'lib/pe_build/provisioner/pe_agent.rb', line 36
def cleanup
vm_def = machine.env.active_machines.find {|vm| vm[0].to_s == config.master_vm.to_s}
if vm_def.nil?
machine.ui.warn I18n.t(
'pebuild.provisioner.pe_agent.skip_purge_no_master',
:master => config.master_vm.to_s
)
return
end
@master_vm = machine.env.machine(*vm_def)
cleanup_agent_cert if config.autopurge
cleanup_agent_type unless config.agent_type == 'agent'
end
|
#provision ⇒ Object
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/pe_build/provisioner/pe_agent.rb', line 21
def provision
provision_init!
unless master_vm.nil?
provision_pe_repo
end
provision_agent
provision_agent_cert if config.autosign
provision_agent_type unless config.agent_type == 'agent'
end
|