Skip to content

Conversation

@kimor79
Copy link
Contributor

@kimor79 kimor79 commented Nov 5, 2014

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).

Copy link
Contributor

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 ;)

@underscorgan
Copy link
Contributor

Hi @kimor79 , could you rebase this against the current master and squash it down to a single commit?

@jonnytdevops
Copy link
Contributor

Closing due to #606

Copy link
Contributor

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

Copy link
Contributor Author

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

@kimor79
Copy link
Contributor Author

kimor79 commented Mar 31, 2015

Sorry, haven't had a chance to look at this in a long while.

@tphoney
Copy link
Contributor

tphoney commented May 18, 2015

ping @kimor79 ?

@kimor79
Copy link
Contributor Author

kimor79 commented May 19, 2015

I have no idea if I did the rebase correctly. How do I squash if I'm not the one merging into master?

@tphoney
Copy link
Contributor

tphoney commented May 19, 2015

Squashing commits
git log --pretty=oneline
To squash the last 2 commits
git rebase --interactive HEAD~2
The read the text, and save. You can view the squash with the log command.
git push -f origin destination_branch

cyberious pushed a commit that referenced this pull request Jun 25, 2015
@cyberious
Copy link
Contributor

pulled locally and rebased and merged c4c0402

@cyberious cyberious closed this Jun 25, 2015
underscorgan pushed a commit that referenced this pull request Jun 25, 2015
(maint) Fix tests from #527 merge - Looks like copy tests mismatched logic of when it should expect changes
cegeka-jenkins pushed a commit to cegeka/puppet-postgresql that referenced this pull request Oct 23, 2017
cegeka-jenkins pushed a commit to cegeka/puppet-postgresql that referenced this pull request Oct 23, 2017
- Looks like copy tests mismatched logic of when it should expect changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants