Skip to content

Instantly share code, notes, and snippets.

@natefoo
Created November 18, 2013 21:00
Show Gist options
  • Save natefoo/7535195 to your computer and use it in GitHub Desktop.
Save natefoo/7535195 to your computer and use it in GitHub Desktop.
---
# file: group_vars/dbservers
postgresql_data_dir: /var/lib/pgsql/9.2/data
---
# file: group_vars/dbservers-main
postgresql_role: dbservers-main
---
# file: roles/postgresql/tasks/main.yaml
- name: Install PostgreSQL pg_hba.conf
copy: src=pg_hba.conf.{{ postgresql_role }} dest={{ postgresql_data_dir }}/pg_hba.conf
when: inventory_hostname in groups['dbservers-main'] or inventory_hostname in groups['dbservers-test']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment