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
16
17
18
|
# File 'lib/pe_build/provisioner/pe_agent.rb', line 16
def agent_version
@agent_version
end
|
#facts ⇒ Object
15
16
17
|
# File 'lib/pe_build/provisioner/pe_agent.rb', line 15
def facts
@facts
end
|
#master_vm ⇒ Object
17
18
19
|
# File 'lib/pe_build/provisioner/pe_agent.rb', line 17
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.
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# File 'lib/pe_build/provisioner/pe_agent.rb', line 33
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
end
|
#provision ⇒ Object
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/pe_build/provisioner/pe_agent.rb', line 19
def provision
provision_init!
unless master_vm.nil?
provision_pe_repo
end
provision_agent
provision_agent_cert if config.autosign
end
|