---
- name: Sync REDCap Prod Database to Val Environment
hosts: vml-rdcdb3
tasks:
- name: Remove any existing backup
file: path={{ bu_dir }}/redcap.sql.gz state=absent
tags:
- prod
- name: Create backup of production redcap database
mysql_db: name=redcap state=dump target={{ bu_dir }}/redcap.sql.gz
login_host=127.0.0.1 single_transaction=yes
tags:
- prod
- name: Change ownership on bu_dir (defined in group_vars/REDCAP)
file: path={{ bu_dir }} owner=ori-ansible group=ori-ansible
recurse=yes state=directory
tags:
- prod
- hosts: vml-redc2
tasks:
- name: Stop httpd for redcap-val.dtmi.duke.edu (vml-redc2)
service: name=httpd state=stopped
tags:
- val
- hosts: vml-rdcdbdev2
tasks:
- name: Drop redcap database from val
mysql_db: name=redcap state=absent login_host=127.0.0.1
tags:
- val
- name: Re-create redcap database for val
mysql_db: name=redcap state=present login_host=127.0.0.1
tags:
- val
- name: Import redcap database into val
mysql_db: name=redcap state=import target={{ bu_dir }}/redcap.sql.gz
tags:
- val
- hosts: vml-redc2
tasks:
- name: Start httpd for redcap-val.dtmi.duke.edu (vml-redc2)
service: name=httpd state=started
tags:
- val
No error message. It just runs and runs and never fails.
Thanks,
Chris Short
https://chrisshort.net
Public PGP Key: http://cshort.co/pub_key
Keybase: http://cshort.co/keybaseio
On Thu, Jun 2, 2016 at 11:03 AM, Johannes Kastl <[email protected]> wrote:
> On 02.06.16 15:17 'Chris Short' via Ansible Project wrote:
> > Out of curiosity I have a mysql_db play in a playbook that imports a
> > database into a pre-production environment. I added
> single_transaction=yes
> > to it and the import never fully finished. Not sure if this is a bug or
> > some external issue but since this is new functionality I'd be willing to
> > aid in testing it.
> >
> Care to share your playbook? And the exact error messages?
>
> Johannes
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Ansible Project" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/ansible-project/j9MkI-AF2qo/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/57504ACF.8050706%40ojkastl.de
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CANJhP0xM9FJg%3D_Af_9L%3DmZbUCgw1LngqneMTNqM1Bqs%3DF8vj4w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.