Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - name: Check to see if DB entry exist for locale
- shell: |
- mysql --host={{ ems_db_host }}
- --user={{ ems_db_user }}
- --password={{ ems_db_password }}
- --skip-column-names
- --execute='SELECT Count(*)
- FROM {{ ems_db_name }}.T_LOCALES
- WHERE LocaleCode = "{{item.language_code}}";'
- register: db_status
- with_items: "{{language_list}}"
- delegate_to: localhost
- run_once: true
- - name: Update DB with requested language pack details if not exist
- mysql_db:
- login_host: "{{ ems_db_host }}"
- login_user: "{{ ems_db_user }}"
- login_password: "{{ ems_db_password }}"
- name: "{{ ems_db_name }}"
- state: import
- target: "~/tmp/deploy/sql/ems_{{item.language_code}}_mysql.sql"
- when: db_status.rc == 0 and db_status.stdout != "1"
- with_items: "{{language_list}}"
- delegate_to: localhost
- run_once: true
- error while evaluating conditional: db_status.rc == 0 and db_status.stdout != "1"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement