Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - block:
- - name:
- file:
- path: /usr/lib/dvn-dps/sql
- state: directory
- when: dps.db != 'localhost'
- - name:
- synchronize:
- src: /usr/lib/dvn-dps/sql
- dest: /usr/lib/dvn-dps/
- mode: pull
- when: dps.db != 'localhost'
- - name: get list of sql schema files in order
- command: sed -n '/vtc_files="/,/"/{/vtc_files="/b;/"/b;p}' create_database.sh
- args:
- chdir: /usr/lib/dvn-dps/sql
- warn: false
- register: dvn_db_schema
- - name: create dvn database
- mysql_db:
- name: dvn
- state: present
- - name: create dvn database schema
- mysql_db:
- name: dvn
- state: import
- target: /usr/lib/dvn-dps/sql/vtc/{{ item }}
- loop: "{{ dvn_db_schema.stdout_lines }}"
- delegate_to: "{{ dps.db if dps.db != 'localhost' else inventory_hostname }}"
- when: inventory_hostname == groups.dps | first
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement