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

[FEATURE REQUEST] - Per state output condition #60069

Open
jynolen opened this issue Apr 21, 2021 · 3 comments
Open

[FEATURE REQUEST] - Per state output condition #60069

jynolen opened this issue Apr 21, 2021 · 3 comments
Labels
Feature new functionality including changes to functionality and code refactors, etc.
Milestone

Comments

@jynolen
Copy link
Contributor

jynolen commented Apr 21, 2021

Is your feature request related to a problem? Please describe.
I would be able to specify per state output configuration in the following example it could be great to hide the changes from

Describe the solution you'd like
It could be really great to have a state related options (just like the require entry) to specify options to hide the content
Something like

# No sensitive info : can be output
deployment_user:
  sqlite3.row_present:
    - db: /etc/salt/sdb.db
    - table: sdb
    - where_sql: key='deployment.user'
    - data:
        key: deployment.user
        value: deployment_user
    - require:
      - sqlite3: sdb
    - _output_ : full

# Sensitive info : can be hide
deployment_password:
  sqlite3.row_present:
    - db: /etc/salt/sdb.db
    - table: sdb
    - where_sql: key='deployment.password'
    - data:
        key: deployment.password
        value: {{ deployment_password }}
    - require:
      - sqlite3: sdb
    - _output_ : hide

Additional context
Here example where per state output condition could be great

# No sensitive info : can be output
deployment_user:
  sqlite3.row_present:
    - db: /etc/salt/sdb.db
    - table: sdb
    - where_sql: key='deployment.user'
    - data:
        key: deployment.user
        value: deployment_user
    - require:
      - sqlite3: sdb

# Sensitive info : can be hide
deployment_password:
  sqlite3.row_present:
    - db: /etc/salt/sdb.db
    - table: sdb
    - where_sql: key='deployment.password'
    - data:
        key: deployment.password
        value: {{ deployment_password }}
    - require:
      - sqlite3: sdb
@jynolen jynolen added Feature new functionality including changes to functionality and code refactors, etc. needs-triage labels Apr 21, 2021
@sagetherage sagetherage added this to the Approved milestone Apr 27, 2021
@sagetherage
Copy link
Contributor

@jynolen since sqlite does have user management we can see this would be of value. We will take a PR for review if you want to submit one. :) Thank you!

@jynolen
Copy link
Contributor Author

jynolen commented Apr 27, 2021

The issue is not just SQLite state related.
For example is you call a http endpoint to retreive a token this token will be output to ardour as well

@sagetherage
Copy link
Contributor

Oh sure, there are likely several other use cases, here.

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.
Projects
None yet
Development

No branches or pull requests

3 participants