0
Ich habe zwei Server, auf denen ich bereitstellen muss, aber sie haben ein etwas anderes Setup. Die Anwendung wird auf jedem Server in einem anderen Pfad bereitgestellt (/var/www/sites/my_site
und /var/www/my_site
).python fabric put mit dynamischem remote_path
Meine Datei sieht etwa wie folgt aus:
env.roledefs = {
'production': ['host1.foo.bar', 'host2.foo.bar']
}
@task
@roles(['production'])
def deploy():
files = getBundlePaths()
for file in files:
# How would I go about uploading to a different path per server?
put(file, ...)