org.gcube.dataanalysis.dataminer.poolmanager.ansible

## 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 and Description
`AnsibleWorker(File root)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addRole(Role r)`
`void` `destroy()` Destroy the worker: - remove the working dir
`void` `ensureWorkStructure()`
`int` `execute(PrintStream ps)`
`File` `getInventoryFile()`
`File` `getPlaybookFile()`
`File` `getRolesDir()`
`File` `getWorkdir()`
`String` `getWorkerId()`
`void` `removeWorkStructure()`
`void` `setInventory(Inventory inventory)`
`void` `setPlaybook(Playbook playbook)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### AnsibleWorker

    public AnsibleWorker(File root)

### Method Detail

#### getWorkdir

    public File getWorkdir()

#### 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:
  `IOException`
  `InterruptedException`
  `org.tmatesoft.svn.core.SVNException`

#### destroy

    public void destroy()

Destroy the worker: - remove the working dir