non idempotent tasks

Kevin Fenzi kevin at scrye.com
Mon Jun 30 17:19:39 UTC 2014


On Mon, 30 Jun 2014 19:05:52 +0200
Pierre-Yves Chibon <pingou at pingoured.fr> wrote:

> These are "normal".
> Both application have an admin DB user and a regular DB user. What
> the playbook does is:
> - set up pkgdb/nuancier with the admin DB user
> - create the DB or create new tables, or nothing if it is all already
> there
> - update the configuration files to use the regular DB user so that
> this is the under-priviledge user used by the application in normal
> condition
> 
> I guess we could:
> - Drop step 1 and 2
> or
> - Make step 1 and 2 rely on a CLI argument

You could use the 'creates' augument possibly and make it make a file ?

ie, 'creates=/etc/nuancer/database-setup' 

it gets created the first time, and skipped after. If you need to
re-run it you manually rm the file and it runs it next playbook run?

kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.fedoraproject.org/pipermail/infrastructure/attachments/20140630/1861b141/attachment.sig>


More information about the infrastructure mailing list