From f52f276f2ea9c23311cdd8c49d19358d432925a8 Mon Sep 17 00:00:00 2001 From: Justin Mayer Date: Wed, 9 Oct 2019 11:17:44 -0700 Subject: [PATCH] Separate SSH user/host/path vars in tasks.py Refs #2623 --- pelican/tools/templates/tasks.py.jinja2 | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pelican/tools/templates/tasks.py.jinja2 b/pelican/tools/templates/tasks.py.jinja2 index 1c063f08..0362eba7 100644 --- a/pelican/tools/templates/tasks.py.jinja2 +++ b/pelican/tools/templates/tasks.py.jinja2 @@ -23,9 +23,10 @@ CONFIG = { 'deploy_path': SETTINGS['OUTPUT_PATH'], {% if ssh %} # Remote server configuration - 'production': '{{ssh_user}}@{{ssh_host}}', - 'production_port': {{ssh_port}}, - 'dest_path': '{{ssh_target_dir}}', + 'ssh_user': '{{ssh_user}}', + 'ssh_host': '{{ssh_host}}', + 'ssh_port': '{{ssh_port}}', + 'ssh_path': '{{ssh_target_dir}}', {% endif %} {% if cloudfiles %} # Rackspace Cloud Files configuration settings @@ -131,8 +132,8 @@ def publish(c): c.run('pelican -s {settings_publish}'.format(**CONFIG)) c.run( 'rsync --delete --exclude ".DS_Store" -pthrvz -c ' - '-e "ssh -p {production_port}" ' - '{} {production}:{dest_path}'.format( + '-e "ssh -p {ssh_port}" ' + '{} {ssh_user}@{ssh_host}:{ssh_path}'.format( CONFIG['deploy_path'].rstrip('/') + '/', **CONFIG))