Skip to content

Instantly share code, notes, and snippets.

@mjinks
Last active May 6, 2016 18:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mjinks/a20e46814589104d30bdaf2af718f8c5 to your computer and use it in GitHub Desktop.
Save mjinks/a20e46814589104d30bdaf2af718f8c5 to your computer and use it in GitHub Desktop.
One pillar already exists:
users:
bob:
home: /some/odd/place/bob
setting_foo: blah
setting_bar: 42
password: [hash]
another is input, where some elements are present:
some_other_title:
martha:
home: /some/odd/place/martha
setting_foo: mumble
users:
bob:
home: /some/odd/place/bob
setting_foo: blah
setting_bar: 42
password: [hash]
martha:
home: /some/odd/place/martha
setting_foo: mumble
setting_bar: 42
password: [hash]
For each entry in my input:
- If there's no item for 'password', I need to generate one using an existing randomizer ('salt "host" cmd.run' will do for me here,
provided I know how to get its output into the pillar)
- For other items, if there's already an entry ("setting_foo"), it shows up in the product, and,
- If not, ("setting_bar"), I have a set of defaults to fill in.
@mjinks
Copy link
Author

mjinks commented May 6, 2016

The stuff about making a password is secondary; I can address that. The real issue is merging in the other stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment