Skip to content

Instantly share code, notes, and snippets.

@conleym
Created November 6, 2017 20:47
Show Gist options
  • Save conleym/2ebc9593567ab1fb401f1bb2c029b5de to your computer and use it in GitHub Desktop.
Save conleym/2ebc9593567ab1fb401f1bb2c029b5de to your computer and use it in GitHub Desktop.
---
- hosts: localhost
gather_facts: no
become: no
vars:
db_stuff:
ev: ev
test: evtester
tasks:
- postgresql_user:
name: "{{ item }}"
state: present
with_items:
- ev
- evtester
- postgresql_db:
name: "{{ item.key }}"
state: absent
with_dict: "{{ db_stuff }}"
- postgresql_db:
name: "{{ item.key }}"
owner: "{{ item.value }}"
state: present
with_dict: "{{ db_stuff }}"
- shell: ". ${WORKON_HOME}/ev-setup/bin/activate && fab db_load_ev_min db_populate_data:account_name=Vorsight"
args:
chdir: "~/ev/execvision"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment