Class AnsibleWorker
- java.lang.Object
-
- org.gcube.dataanalysis.dataminer.poolmanager.ansible.AnsibleWorker
-
public class AnsibleWorker extends Object
This class is responsible for the interface with ansible, retrieving log, etc. etc. It's not supposed to access templates and static stuff files. It does not know the service datamodel.- Author:
- paolo
-
-
Constructor Summary
Constructors Constructor Description AnsibleWorker(File root)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRole(Role r)voiddestroy()Destroy the worker: - remove the working dirvoidensureWorkStructure()intexecute(PrintStream ps)FilegetInventoryFile()FilegetPlaybookFile()FilegetRolesDir()StringgetWorkerId()voidremoveWorkStructure()voidsetInventory(Inventory inventory)voidsetPlaybook(Playbook playbook)
-
-
-
Constructor Detail
-
AnsibleWorker
public AnsibleWorker(File root)
-
-
Method Detail
-
getRolesDir
public File getRolesDir()
-
getWorkerId
public String getWorkerId()
-
ensureWorkStructure
public void ensureWorkStructure()
-
removeWorkStructure
public void removeWorkStructure()
-
getPlaybookFile
public File getPlaybookFile()
-
getInventoryFile
public File getInventoryFile()
-
setInventory
public void setInventory(Inventory inventory) throws IOException
- Throws:
IOException
-
setPlaybook
public void setPlaybook(Playbook playbook) throws IOException
- Throws:
IOException
-
addRole
public void addRole(Role r) throws IOException
- Throws:
IOException
-
execute
public int execute(PrintStream ps) throws IOException, InterruptedException, org.tmatesoft.svn.core.SVNException
- Throws:
IOExceptionInterruptedExceptionorg.tmatesoft.svn.core.SVNException
-
destroy
public void destroy()
Destroy the worker: - remove the working dir
-
-