Comments (12)
It's a good idea.
In the meantime you can use
--pkcs7-private-key and --pkcs7-public-key to define your key locations each time. (--help for more info)
from hiera-eyaml.
I was thinking about using the same idea as Hiera itself. You configure hiera with the hiera.yaml conf file (in /etc/puppet) but you can pass it in (or a different one) when running hiera from the command line with the -c parameter
Would could also use the -c parameter and read a yaml file that gets passed in and extract the values. If we did it right we could even reuse the hiera.yaml config file if we wanted to?
from hiera-eyaml.
I would say definitely reuse the hiera.yaml format; that file will have the right settings in it, so could be supplied just as easily.
from hiera-eyaml.
I'm going to try and pick this up, mainly because it would be useful to me at the moment, but also to get more familiar with the code, it's come along way since I last had a deep dive!
To that end I've written a very basic rspec framework so that I can debug and step through the code to work out what's going on. I'll add a few tests as I see the need, but as I've never done anything with rspec up to now (apart from google what it is) I'll probably be back to get some input/help/suggestions!!
@gtmtech are you still planning on using trollop to handle parameters after you changes in #45?
from hiera-eyaml.
I don't mean to stamp on your parade @TomPoulton, but doesn't that mean we'd have two testing frameworks? I'm not familiar with Cucumber vs RSpec, but I feel like we probably only need one of the two - for clarity and ease of working with the code.
from hiera-eyaml.
That's a fair point, and we might end up not needing it. I've only written one small test so that I can step through the code in IntelliJ and watch how the code works, what the values are etc, I'm still getting used to ruby so I can't read it as easily as I can Java or C#
They are slightly different though from what I can tell, in that rspec is a unit testing framework and cucumber is a functional testing framework, so cucumber has to run against a built and installed gem. I've managed to programmatically set the command line arguments you would pass to the eyaml command in the tests themselves (turns out it's really easy in ruby) so I can run the eyaml command (CLI class) without creating a new gem which is making life easier for me at the moment!
Really its just a bunch of files in a directory so I can delete them when I'm done (or add to gitignore) if we feel they're not necessary or if rspec becomes a real sludge to work with and integrate with travis etc!
from hiera-eyaml.
@TomPoulton - all my code is done now - you can see it still uses Trollop, so feel free to add the -c as you wish to get values out of hiera.yaml.
from hiera-eyaml.
Another idea: maybe the --pkcs7-private-key and --pkcs7-public-key parameters can be read from environment variables as well. In that case people could put it in their ~/.bash_rc or a script that enables switching between different puppet projects
from hiera-eyaml.
It would be great if you could write out local config to something like ~/.eyaml/config
from hiera-eyaml.
So I've done some work with this drawing on @sammcj's work and @reinoud's suggestion of supporting an environment variable. I've added it to the docs but a summary can be read on pull request #76.
I'm going to tag this issue as a duplicate and persuade someone to review and merge the work.
from hiera-eyaml.
I'm certainly no coder so it was just my 'best effort' and first go at Ruby - This is a great fix, Thanks @sihil ,
from hiera-eyaml.
Closing this issue as I believe it is fixed with the release of 2.0.1
from hiera-eyaml.
Related Issues (20)
- Recrypt shouldn't default to changing encryption
- Automatically convert encrypted values to Sensitive[T] HOT 4
- Error during hiera-eyaml gem installation
- hiera-eyaml Error was PKCS7[Method: 112, Reason: 115, Data: null] when using mutiple public private keys HOT 2
- Concerns about the encrypted? method HOT 2
- Gpg recrypt emits error about missing pkcs7 key HOT 2
- Using `3.2.1` for editing an eyaml created with `3.2.0` will mess up formatting HOT 11
- Subsequent "eyaml encrypt -s test" calls return different signatures HOT 2
- Incompatability with ruby 3.1.0 HOT 7
- lookup example with default parameter if decrypt fails HOT 3
- get return values instead of fatal errors
- Unable to encrypt string that begins with two or more hyphens (dashes) HOT 1
- Ruby >= 2.5.0 silently required since hiera-eyaml v3.2.3?
- Uneeded config warnings when using keys in env vars ([pkcs7] both public_key and public_key_env_var specified, using public_key)
- Allow execution of Puppet functions from Hiera HOT 4
- Allow Hash keys as Array HOT 2
- Encrypt yaml file on my workstation and push to git HOT 1
- Remote Code Execution vulnerability in the hiera-eyaml tool HOT 2
- Release a new version HOT 2
- multi-line yaml broken in decrypt output
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hiera-eyaml.