'used for making a tarfile from a role directory'

@classmethod
def makeTar(cls, output_file, source_dir):

    try:
        tar = tarfile.open(output_file, 'w:gz')
        tar.add(source_dir, arcname=os.path.basename(source_dir))
    except AttributeError:
        pass
    finally:
        tar.close()
