@task
def bundle_certs(ctx, domain, cert_path):
 cert_files = ['{0}.crt'.format(domain), 'COMODORSADomainValidationSecureServerCA.crt', 'COMODORSAAddTrustCA.crt', 'AddTrustExternalCARoot.crt']
 certs = ' '.join((os.path.join(cert_path, cert_file) for cert_file in cert_files))
 cmd = 'cat {certs} > {domain}.bundle.crt'.format(certs=certs, domain=domain)
 ctx.run(cmd)

@ task def bundle_certs ( ctx , domain , cert_path ) : cert_files = [ '{0}.crt' . format ( domain ) , 'COMODORSADomainValidationSecureServerCA.crt' , 'COMODORSAAddTrustCA.crt' , 'AddTrustExternalCARoot.crt' ] certs = ' ' . join ( ( os . path . join ( cert_path , cert_file ) for cert_file in cert_files ) ) cmd = 'cat {certs} > {domain}.bundle.crt' . format ( certs = certs , domain = domain ) ctx . run ( cmd )
concatenate certificates from namecheap in the correct order .