-
Notifications
You must be signed in to change notification settings - Fork 610
Add onlyif option to postgresql_psql type #527
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and there i thought SQL was supposed to be idempotent to begin with ;)
|
Hi @kimor79 , could you rebase this against the current master and squash it down to a single commit? |
|
Closing due to #606 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you checking against puppet 4? run_unless_sql_command will return an array for version greater than 3.4, so this looks like your code won't work for 3.4 < x < 4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I just copied another similar stanza
|
Sorry, haven't had a chance to look at this in a long while. |
Modulesync updates
|
ping @kimor79 ? |
…l into psql-onlyif Conflicts: manifests/server/grant.pp spec/acceptance/postgresql_psql_spec.rb
|
I have no idea if I did the rebase correctly. How do I squash if I'm not the one merging into master? |
|
Squashing commits |
|
pulled locally and rebased and merged c4c0402 |
(maint) Fix tests from #527 merge - Looks like copy tests mismatched logic of when it should expect changes
- Looks like copy tests mismatched logic of when it should expect changes
This adds an onlyif option to the postgresql_psql type to allow for commands to only run if the onlyif command succeeds. The primary use case being to only add a table grant if the table exists (if for example, the tables are managed outside of puppet but the grants are managed within puppet).