Hi y'all!
Small ansible question: I have this ansible playbook which uploads and runs a script to set some permissions in the database. This worked fine while the playbook was only executed on a single server, but now that mailman01 and 02 are being setup for prod, the script is executed on both machines, and tries to set the permissions in the same DB server at the same time, which produces a psycopg2.InternalError (tuple concurrently updated).
Any idea how I can ask Ansible to not run this task in parallel on both servers? Any other way around this?
Thanks,
Aurélien
Use the serial keyword
http://docs.ansible.com/playbooks_delegation.html
On Fri, Feb 7, 2014 at 7:28 PM, Aurélien Bompard gauret@free.fr wrote:
Hi y'all!
Small ansible question: I have this ansible playbook which uploads and runs a script to set some permissions in the database. This worked fine while the playbook was only executed on a single server, but now that mailman01 and 02 are being setup for prod, the script is executed on both machines, and tries to set the permissions in the same DB server at the same time, which produces a psycopg2.InternalError (tuple concurrently updated).
Any idea how I can ask Ansible to not run this task in parallel on both servers? Any other way around this?
Thanks,
Aurélien
infrastructure mailing list infrastructure@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/infrastructure
I guess you want
--fork <number>
to set the number o forks
Cheers
On 07.02.2014 15:27, Anshu Prateek wrote:
Use the serial keyword
http://docs.ansible.com/playbooks_delegation.html
On Fri, Feb 7, 2014 at 7:28 PM, Aurélien Bompard gauret@free.fr wrote:
Hi y'all!
Small ansible question: I have this ansible playbook which uploads and runs a script to set some permissions in the database. This worked fine while the playbook was only executed on a single server, but now that mailman01 and 02 are being setup for prod, the script is executed on both machines, and tries to set the permissions in the same DB server at the same time, which produces a psycopg2.InternalError (tuple concurrently updated).
Any idea how I can ask Ansible to not run this task in parallel on both servers? Any other way around this?
Thanks,
Aurélien
infrastructure mailing list infrastructure@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/infrastructure
infrastructure mailing list infrastructure@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/infrastructure
mm, I think the -f option is only for command line ansible and not for playbook?
On Fri, Feb 7, 2014 at 8:12 PM, Joerg Stephan johe.stephan@ymail.comwrote:
I guess you want
--fork <number>
to set the number o forks
Cheers
On 07.02.2014 15:27, Anshu Prateek wrote:
Use the serial keyword http://docs.ansible.com/playbooks_delegation.html
On Fri, Feb 7, 2014 at 7:28 PM, Aurélien Bompard gauret@free.fr gauret@free.fr wrote:
Hi y'all!
Small ansible question: I have this ansible playbook which uploads and runs a script to set some permissions in the database. This worked fine while the playbook was only executed on a single server, but now that mailman01 and 02 are being setup for prod, the script is executed on both machines, and tries to set the permissions in the same DB server at the same time, which produces a psycopg2.InternalError (tuple concurrently updated).
Any idea how I can ask Ansible to not run this task in parallel on both servers? Any other way around this?
Thanks,
Aurélien
infrastructure mailing listinfrastructure@lists.fedoraproject.orghttps://admin.fedoraproject.org/mailman/listinfo/infrastructure
infrastructure mailing listinfrastructure@lists.fedoraproject.orghttps://admin.fedoraproject.org/mailman/listinfo/infrastructure
infrastructure mailing list infrastructure@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/infrastructure
Use the serial keyword http://docs.ansible.com/playbooks_delegation.html
Thanks, I missed that one.
Aurélien
infrastructure@lists.fedoraproject.org