Allow for deploying v02 certbot account

This commit is contained in:
Lance Edgar 2022-08-14 13:57:10 -05:00
parent ba05d616d8
commit 987731885b

View file

@ -246,7 +246,8 @@ class Deployer(object):
from rattail_fabric2.backup import deploy_backup_app from rattail_fabric2.backup import deploy_backup_app
deploy_backup_app(c, self, envname, *args, **kwargs) deploy_backup_app(c, self, envname, *args, **kwargs)
def certbot_account(self, c, uuid, localdir='certbot/account'): def certbot_account(self, c, uuid, localdir='certbot/account',
version='01'):
""" """
Deploy files to establish a certbot account on target server Deploy files to establish a certbot account on target server
""" """
@ -255,8 +256,8 @@ class Deployer(object):
localdir = localdir.rstrip('/') localdir = localdir.rstrip('/')
paths = [ paths = [
'/etc/letsencrypt/accounts', '/etc/letsencrypt/accounts',
'/etc/letsencrypt/accounts/acme-v01.api.letsencrypt.org', '/etc/letsencrypt/accounts/acme-v{}.api.letsencrypt.org'.format(version),
'/etc/letsencrypt/accounts/acme-v01.api.letsencrypt.org/directory', '/etc/letsencrypt/accounts/acme-v{}.api.letsencrypt.org/directory'.format(version),
] ]
final_path = '{}/{}'.format(paths[-1], uuid) final_path = '{}/{}'.format(paths[-1], uuid)
paths.append(final_path) paths.append(final_path)