def METHOD_NAME(self):
    site_url = settings.SITE_URL
    download_host = settings.APPLET_DOWNLOAD_HOST
    bootstrap_token = settings.BOOTSTRAP_TOKEN
    host_id = str(self.deployment.host.id)
    if not site_url:
        site_url = "http://localhost:8080"
    options = self.deployment.host.deploy_options
    core_host = options.get("CORE_HOST", site_url)
    core_host = core_host.rstrip("/")
    if not download_host:
        download_host = core_host
    download_host = download_host.rstrip("/")
    def handler(plays):
        applet_host_name = self.deployment.host.name
        hostname = '{}-{}'.format(applet_host_name, random_string(7))
        for play in plays:
            play["vars"].update(options)
            play["vars"]["APPLET_DOWNLOAD_HOST"] = download_host
            play["vars"]["CORE_HOST"] = core_host
            play["vars"]["BOOTSTRAP_TOKEN"] = bootstrap_token
            play["vars"]["HOST_ID"] = host_id
            play["vars"]["HOST_NAME"] = hostname
        return plays
    return self._generate_playbook("playbook.yml", handler)