Skip to content
This repository has been archived by the owner on Jul 21, 2020. It is now read-only.

Hardcoded Postgress version in copy command #1

Open
fooeybartoni opened this issue Oct 6, 2014 · 2 comments
Open

Hardcoded Postgress version in copy command #1

fooeybartoni opened this issue Oct 6, 2014 · 2 comments

Comments

@fooeybartoni
Copy link

Daniel,

First thanks a million for creating this tutorial. I am using it to learn ansible. Quick note is that in the /setup/main.yml file where you are copying the pg_hba.conf file you have a harcoded path to the file. I wonder if there is a way to query for the version of postress to put in the path as a variable? For now I am updating to 9.3 locally. Thanks.

[email protected]

@danielgroves
Copy link
Owner

You could do this with the templates module in Ansible, I was trying to keep things as simple as possible when I wrote this. However, I think you're probably correct and using a template would be better practice and good to teach people. As with #2, feel free to submit a pull request, but otherwise I'll take a look when I get home.

@danielgroves
Copy link
Owner

I'm going to have to take a proper look at this one at a later date; simply didn't have time today. However, I think this is possible by parsing the shell output with Regex as explained in the Ansible Variables documentation.

However, should this prove not to be possible the next best thing would be to to expose the version number as a variable, and then install the specified version.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants