Pyinfra: Certbot

Created on 30 Jun 2020  路  3Comments  路  Source: Fizzadar/pyinfra

Is your feature request related to a problem? Please describe.
I would like to use the certbot cli to automate provisioning of tls certificates.

Describe the solution you'd like
An operation that wraps the certbot cli. The certbot cli is huge. I wanted to learn more about writing custom operations and facts so I began one (https://github.com/meantheory/pyinfra/tree/certbot-operation). It does work for my very limited use case

certbot.certonly(cert_name=name, domains=domains, dns_provider="google")

but it lacks all the many features in the cli so I'm not sure how useful it is to anyone but me.

Most helpful comment

@meantheory I think this would be best built as a pyinfra-certbot package, similar to my pyinfra-docker.

My reason for this suggestion is the difference between builtin operations & deploys:

Builtin Operations: use builtin system tools (POSIX filesystem, systemd, system package managers, etc)
Deploys: extend this to setup & configure 3rd party software (docker, certbot, nginx etc)

It has occurred to me that it would be good to:

  • Explain the above in the docs
  • Recommend creating operations vs. deploys in CONTRIBUTING.md
  • Reference both above when choosing an issue

All 3 comments

@meantheory I think this would be best built as a pyinfra-certbot package, similar to my pyinfra-docker.

My reason for this suggestion is the difference between builtin operations & deploys:

Builtin Operations: use builtin system tools (POSIX filesystem, systemd, system package managers, etc)
Deploys: extend this to setup & configure 3rd party software (docker, certbot, nginx etc)

It has occurred to me that it would be good to:

  • Explain the above in the docs
  • Recommend creating operations vs. deploys in CONTRIBUTING.md
  • Reference both above when choosing an issue

This sounds like a good path forward.

created pyinfra-certbot as suggested.

Was this page helpful?
0 / 5 - 0 ratings