Nicolas Grilly
2013-09-04 15:01:15 UTC
Hello,
We run our database migrations using Ansible with something along these
lines:
- name: Run database migrations
command: env/bin/python migrate.py -q
chdir=$project_dir/releases/$release_date
register: result
changed_when: result.stdout
migrate.py prints the list of applied migrations to stdout.
We try to print this list because our developers want some feedback about
which migrations were applied:
- debug: msg="{{result.stdout}}"
when: result.stdout
But all new lines are escaped to \n, which makes the output quite difficult
to read.
Is there any solution to this?
In your own projects, how do you execute your database migrations? Do you
try to get some feedback as what we try to achieve here? Or do you use
another approach?
Thanks,
-- Nicolas
We run our database migrations using Ansible with something along these
lines:
- name: Run database migrations
command: env/bin/python migrate.py -q
chdir=$project_dir/releases/$release_date
register: result
changed_when: result.stdout
migrate.py prints the list of applied migrations to stdout.
We try to print this list because our developers want some feedback about
which migrations were applied:
- debug: msg="{{result.stdout}}"
when: result.stdout
But all new lines are escaped to \n, which makes the output quite difficult
to read.
Is there any solution to this?
In your own projects, how do you execute your database migrations? Do you
try to get some feedback as what we try to achieve here? Or do you use
another approach?
Thanks,
-- Nicolas
--
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 ansible-project+***@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
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 ansible-project+***@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.