Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix installation using package manager on Debian 8 #25

Closed
pkoziol opened this issue Apr 22, 2017 · 4 comments
Closed

Fix installation using package manager on Debian 8 #25

pkoziol opened this issue Apr 22, 2017 · 4 comments

Comments

@pkoziol
Copy link

pkoziol commented Apr 22, 2017

Package certbot is currently available only in jessie-backports on Debian 8. That means certbot installation using package manager requires configuring that repository first - I used role jnv.debian-backports for that. It would be great if this role did it automatically or it was mentioned in the docs.

It also requires specifying default release for apt - I just replaced line:
package: "name={{ certbot_package }} state=present"
with:
apt: "name={{ certbot_package }} default_release=jessie-backports state=present"
in tasks/install-with-package.yml, but it is not very portable I guess.

@styks1987
Copy link

The documentation addresses this pretty clearly from what I can see. You should be installing from the sources on jessie, the install time is very short and works without messing with the sources list which IMO always gets forgotten.

https://github.com/geerlingguy/ansible-role-certbot#source-installation-from-git

@avra911
Copy link

avra911 commented Jun 2, 2017

installing from source still needs apt: "name=python-ndg-httpsclient state=present" in Debian 8:

Traceback (most recent call last):
  File "/usr/bin/certbot", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3019, in <module>
    @_call_aside
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3003, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3032, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 655, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 963, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 849, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'ndg-httpsclient' distribution was not found and is required by requests

@pm5
Copy link

pm5 commented Sep 8, 2017

The documentation says source installation might be desired for Debian < 8, which seems to me suggests that it's not required on Debian 8, but it is unless you have jessie-backports.

I think it would be better if the documentation is change to something like "Debian < 8 or Debian 8 without backports"?

@geerlingguy
Copy link
Owner

See commit linked above ^

Basically, if you're on any OS older than the latest generation of Ubuntu/CentOS/Debian/etc., then I'd recommend using the source install instead of the package install.

Alternatively, in the future this role might use the upstream package repository instead of the OS repos, meaning the package install would (or at least should) install a much more recent version. And in Debian 8's case... one that actually is able to be installed since it would exist :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants