Skip to content
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

Allow pillar to point to a file inside pillar roots. #3790

Closed
UtahDave opened this issue Feb 19, 2013 · 9 comments
Closed

Allow pillar to point to a file inside pillar roots. #3790

UtahDave opened this issue Feb 19, 2013 · 9 comments
Assignees
Labels
Feature new functionality including changes to functionality and code refactors, etc. stale
Milestone

Comments

@UtahDave
Copy link
Contributor

Allow pillar to point to a file inside pillar roots. The contents of that file then become the value of that pillar key.

Example use case: deploy ssh keys

@ghost ghost assigned thatch45 Mar 1, 2013
@UtahDave
Copy link
Contributor Author

UtahDave commented Mar 1, 2013

Duplicate of: #1543

@basepi
Copy link
Contributor

basepi commented Jun 12, 2014

Actually, #1543 is quite a bit different from what I can tell.

@jaloren
Copy link
Contributor

jaloren commented Jun 20, 2014

+1

1 similar comment
@arnisoph
Copy link
Contributor

+1

@wwentland
Copy link
Contributor

It shouldn't be too hard to implement this in pure Python. You would simply read the file and then return a dictionary with the data. Something along the lines of:

#!py

def run():
    return {'foo_key': open("/path/to/file").read()}

You would naturally want to write better Python code there, but that is the general idea. I'd still like to see the functionality proposed in this wishlist bug though.

@mkorkalo
Copy link

mkorkalo commented Jul 6, 2016

+1

1 similar comment
@porunov
Copy link
Contributor

porunov commented Dec 20, 2016

+1

@The-Loeki
Copy link
Contributor

The way we do it:

web:
  ssl:
{%- import_text 'my/awesome/cert/cert.pem' as ssl_cert %}
    cert: |
      {{ ssl_cert|indent(6) }}

@stale
Copy link

stale bot commented Aug 10, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature new functionality including changes to functionality and code refactors, etc. stale
Projects
None yet
Development

No branches or pull requests

9 participants