def create_copy_task(self, host, src, dest, uuid):
     #TODO backup
     return AnsibleTask('%s_copy_%s' % (uuid, os.path.basename(src)), [host], 'copy', 'src=%s dest=%s backup=yes' % (src, dest))
 def create_mount_task(self):
     return AnsibleTask('%s_fs_mount' % self.component, self.hosts, 'mount', 'src=/dev/%s name=/var/lib/%s/instances fstype=xfs state=mounted' % (self.disc, self.component))
 def create_service_start_task(self, hosts):
     return AnsibleTask('%s_service_start' % self.component, hosts, 'service', 'name=openstack-%s-api state=started' % self.component)
 def create_fetch_task(self, host, src, dest, uuid):
     return AnsibleTask('%s_fetch_%s' % (uuid, os.path.basename(src)), [host], 'fetch', 'src=%s dest=%s flat=yes' % (src, dest))