ansible-acme-sh icon indicating copy to clipboard operation
ansible-acme-sh copied to clipboard

Allow for easily setting the default CA: default to Letsencrypt.org

Open robbyoconnor opened this issue 3 years ago • 27 comments

A more robust version of #15 -- allows you to choose the CA you wish to use but defaults to LetsEncrypt.org.

robbyoconnor avatar Jun 22 '21 22:06 robbyoconnor

CI failure isn't my fault.

robbyoconnor avatar Jun 22 '21 23:06 robbyoconnor

Thanks, I'll check through this in the morning.

Yep CI needs to be converted over to GitHub Actions at some point in the future.

nickjj avatar Jun 23 '21 00:06 nickjj

I did actually go through and merge in most of the existing PRs -- if you want to manually merge them, they're all in the my-branch branch on my fork. I just didn't merge in #10 because it's not needed by me.

robbyoconnor avatar Jun 23 '21 01:06 robbyoconnor

Thanks. Going by the documentation at https://github.com/acmesh-official/acme.sh/wiki/Server are you 100% sure it works? It mentions using --set-default-ca only when you're not issuing or installing a cert.

Also I think we might run into trouble with using the staging server because the server type is letsencrypt_test instead of potentially using the --staging flag like before?

nickjj avatar Jun 23 '21 11:06 nickjj

Fixed.

robbyoconnor avatar Jun 24 '21 22:06 robbyoconnor

Have you run it with this set of flags successfully?

Edit: What if we used the default flag to avoid having to call it on every issue?

nickjj avatar Jun 24 '21 22:06 nickjj

Will run it shortly -- Don't merge yet.

robbyoconnor avatar Jun 24 '21 22:06 robbyoconnor

(I have to migrate my playbook from another role I was using)

robbyoconnor avatar Jun 24 '21 23:06 robbyoconnor

Thanks, if you can run it on both the staging and live servers for a new certificate and a renew that would be amazing and useful to have as output pasted here.

nickjj avatar Jun 24 '21 23:06 nickjj

Will do

robbyoconnor avatar Jun 24 '21 23:06 robbyoconnor

So I just looked at the actual script for acme.sh and setting the ACME server to letsencrypt_test is the same as passing --staging.

Still going to test this but just wanted to post this comment.

robbyoconnor avatar Jun 25 '21 02:06 robbyoconnor

It did set the CA correctly but didn't run correctly. I wound up not using this role. I'll leave this PR open.

robbyoconnor avatar Jul 02 '21 04:07 robbyoconnor

What ended up happening if you don't mind me asking.

nickjj avatar Jul 02 '21 10:07 nickjj

I was under a time crunch (my LE cert was expiring July 5) and didn't feel like debugging it but the role was failing weirdly. I wound up installing the certbot snap and renewing that way.

robbyoconnor avatar Jul 02 '21 18:07 robbyoconnor

Fair enough, to be honest I haven't used this role in almost 3 years. Happy to hear you resolved it in some way.

nickjj avatar Jul 02 '21 23:07 nickjj

Should we merge this then? :)

dchimeno avatar Nov 05 '21 12:11 dchimeno

Based on this:

It did set the CA correctly but didn't run correctly. I wound up not using this role. I'll leave this PR open.

I'm thinking merging it wouldn't be a good idea, although it's quite possible the role didn't work for other reasons.

nickjj avatar Nov 05 '21 12:11 nickjj

I don't have the time to debug it myself...so not quite.

robbyoconnor avatar Nov 07 '21 21:11 robbyoconnor

no worries, thanks anyway :)

dchimeno avatar Nov 15 '21 09:11 dchimeno

@dchimeno if you wanna get it working, by all means

robbyoconnor avatar Nov 15 '21 23:11 robbyoconnor

Just make a PR against my fork on this branch

robbyoconnor avatar Nov 15 '21 23:11 robbyoconnor

@dchimeno if you wanna get it working, by all means

I finally made it with another role, so no special interest here anymore. Thanks anyway.

dchimeno avatar Nov 17 '21 14:11 dchimeno

I finally made it with another role, so no special interest here anymore. Thanks anyway.

No issue @dchimeno - all is good.

robbyoconnor avatar Nov 19 '21 04:11 robbyoconnor

I managed to get it working only with adding "--server letsencrypt"

TonyBostonTB avatar Nov 19 '21 19:11 TonyBostonTB

@dchimeno if you wanna get it working, by all means

I finally made it with another role, so no special interest here anymore. Thanks anyway.

what did you use?

lionslair avatar Jan 05 '22 09:01 lionslair

@dchimeno if you wanna get it working, by all means

I finally made it with another role, so no special interest here anymore. Thanks anyway.

what did you use?

https://github.com/thermistor/acme_sh

dchimeno avatar Jan 10 '22 08:01 dchimeno

@dchimeno if you wanna get it working, by all means

I finally made it with another role, so no special interest here anymore. Thanks anyway.

what did you use?

https://github.com/thermistor/acme_sh

Yeah I forked it and made a couple mods for it too. https://github.com/lionslair/ansible-acme-sh

lionslair avatar Jan 11 '22 05:01 lionslair