andreaswolf / ansible-role-letsencrypt

Ansible role for generating certificates with acme-tiny via Let’s encrypt
46 stars 20 forks source link

Install python argparse #24

Closed emmetog closed 8 years ago

emmetog commented 8 years ago

Bumped into this again on a fresh server. The acme_tiny.py script needs argparse, it crashes on a server which doesn't have it.

TASK: [letsencrypt | generate the initial certificate] ************************
....
stdout: Generating certificate for <domain>
error while generating certificate for <domain>
Traceback (most recent call last):
  File "/usr/local/letsencrypt/acme_tiny.py", line 2, in <module>
    import argparse, subprocess, json, os, sys, base64, binascii, time, hashlib, re, copy, textwrap, logging
ImportError: No module named argparse

Anything I can do to help get this merged?

andreaswolf commented 8 years ago

Sorry, I had a little less spare time the last weeks. I’ll merge this for now, although I’m not too happy with using pip instead of the OS-provided packages.

emmetog commented 8 years ago

@andreaswolf ok. I'm curious though, why do you prefer using the os packages to pip? I'm wondering because python is definitely a dependency in order to run the acmy_tiny script and so it's not too much of a stretch to assume pip is installed too. Are you hoping to remove pip as a dependency too?

The other drawback I see to using the os packages is that we'll have to do a switch for the correct package manager, use yum for centos and apt for ubuntu, while with pip we don't need to worry.