Skip to content

Instantly share code, notes, and snippets.

@Xerkus
Forked from maxim/task.yml
Created June 10, 2014 18:20
Show Gist options
  • Save Xerkus/ef98328f3d8bcbf553c5 to your computer and use it in GitHub Desktop.
Save Xerkus/ef98328f3d8bcbf553c5 to your computer and use it in GitHub Desktop.
- name: ensure postgresql hstore extension is created
sudo: yes
sudo_user: postgres
shell: "psql {{ postgresql_database }} -c 'CREATE EXTENSION hstore;'"
register: psql_result
failed_when: >
psql_result.rc != 0 and ("already exists" not in psql_result.stderr)
changed_when: "psql_result.rc == 0"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment