-
Notifications
You must be signed in to change notification settings - Fork 136
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
Using certonly in webroot mode fails with "can't convert Enumerable::Enumerator into Array" #28
Comments
removing ".cycle" from letsencrypt certonly.pp and using a matching-size array of web roots makes this work... not sure why cycle() doesn't work the same way in puppet as it does in irb. |
I can +1 this issue with Master Puppet 3.7.5, Ruby 1.8.7 |
@akomakom just want to confirm: you're running 1.8.7 on the agent but 2.1.2 on the master? It would make sense with 1.8.7 on the master. This module isn't tested against 1.8.7 and, to be quite honest, I have no desire to support such an old Ruby version. |
@danzilio You are right, the master is using 1.8.7, even though I have 2.1.2 installed also, my mistake. Most of our infrastructure is running on Centos 6 and that's the ruby you get, so I'll stick with my hack until we can test newer ruby. Thanks! |
@akomakom Can you make a fork with that workaround? |
@ways I made a fork: https://github.com/akomakom/puppet-letsencrypt , but it reduces functionality (The two arrays must always be the same size). |
@akomakom Ok. I made one at https://github.com/copyleft/puppet-letsencrypt/ with a new plugin called cli, which just allows you to specify everything via additional_args. |
@ways interesting. that's something I would consider merging. although I'd rather change the name from |
@danzilio Cool. I'll be happy to change it. I started out calling it 'manual', but that can be confused with letsencrypts manual verification. 'none', 'noop' or 'ways_rulez!' sounds OK to me. Want a pull-request for one of those? |
@ways I'm starting to wonder if we have too much indirection/abstraction around the command that gets run. Thoughts? |
@danzilio Hm. Not sure what you mean. After inserting this hack? I don't see any problem with it. As long as the documentation is solid. I think it's a short-lived solution for us stuck with old setups, and most people can ignore it. |
@ways i'm just wondering if the more durable solution is to give the user more access to the command that gets run... Let me mull this over a bit! |
@danzilio Ah, understood. No rush. |
@danzilio Any progress? |
Enumerable#cycle is only available in 1.9+, so change the zipping of domains to webroot_paths with a simplified expansion of webroot_paths to match the number of domains. Fixes voxpupuliGH-28
I opened #40 with a compatible equivalent of the existing #cycle call, though for my personal use of this module I'd also be happy removing cycle entirely and having a fixed domains -> webroot_paths list (per akomakom@bf99c26 which I'm currently using). I like the existing abstraction over the webroot command, it makes writing wrappers much easier. |
Hmm...I feel like @akomakom's solution is cleaner. Is this the more intuitive solution? |
I agree having the array lengths match is the cleaner interface - the zipping behaviour might be useful for some, but I think it's a minority feature. The downside is that it's an API change, but since the module's 0.x, perhaps you're OK accepting it? |
Correction, it's 1.x now, so it'd probably be considered a major version change. |
I'm fine bumping the major version. There are some big changes coming in the next release, the major version bump will raise some awareness. |
The webroot_paths and domain array should not need to match. it's possible to specify one webroot path and multiple domains on the cli. This standard case should be reflected. at least one-for-all and matching numbers should be supported. I don't know how mismatched lengths should be handled best. Just append the remaining domains with no webroot specified, perhaps? |
@pgassmann ah nice, you're right - the CLI arguments don't need to match.
The docs show this format with mismatched lengths is supported, any additional domains use the last webroot path. The current behaviour of this module with the cycle is to repeat from the first webroot path, so we ought to just remove that and allow the regular certbot behaviour. |
When fewer webroot_paths than domains are supplied, certbot/LE will use the last webroot path given rather than the module cycling through webroot_paths. When webroot_paths is one element, there will be no behaviour difference. Fixes voxpupuliGH-28
master...domcleal:28-no-cycle for that last suggested change. |
@domcleal looks good to me! i'll pull this in |
When fewer webroot_paths than domains are supplied, certbot/LE will use the last webroot path given rather than the module cycling through webroot_paths. When webroot_paths is one element, there will be no behaviour difference. Fixes voxpupuliGH-28
Puppet: 3.8.5
Letsencrypt: 0.5.0 via GIT (0.1.0, which is default, doesn't like Centos 6 with Ruby 1.8.7, and adding epel doesn't seem to get me any packages, thus I'm using git.)
Ruby: 2.1.2p95 on the master, 1.8.7 on the node.
Error:
Now, I'm not sure what exactly is Enumerable here, so I tried it on command line and it works fine:
Obviously I had to drop the '@' signs.
I'm not that familiar with rake and couldn't get the tests to work, so this remains unsolved on my end.
The text was updated successfully, but these errors were encountered: