Yep, this isn't really an idempotence question, this is how to deal with an error question.
See details here: https://www.google.com/search?q=database+disk+image+is+malformed The suggestion seems to be to rebuild your package database. This is not something we'd want the yum module to do automatically. On Sun, Apr 6, 2014 at 1:41 PM, Dick Davies <[email protected]> wrote: > In this case it sounds like yum has had an issue and got itself in a > mess, it's not really > something Ansible can do much about as it delegates to yum to handle this. > > If it requires user intervention to solve, that's where ad-hoc > commands come in. > > ansible all -a "sudo yum get_your_act_together" > > > > On 5 April 2014 19:50, Sean Bigdatafun <[email protected]> wrote: > > I am experimenting a playbook and one task failed during its execution > > > > ----- my playbook ----- > > > > - name: yum install epel packages > > > > yum: > > name= > http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm > > state=present > > > > -------------------------------- > > > > The above task failed for some reason, as log showed below. > > > > failed: [ceph-osd1] => {"changed": true, "item": "", "rc": 1, "results": > > ["Loaded plugins: fastestmirror, security\nLoading mirror speeds from > cached > > hostfile\n * base: ftp.osuosl.org\n * epel: linux.mirrors.es.net\n * > extras: > > centosc5.centos.org\n * updates: centosz5.centos.org\n"]} > > > > msg: Error: database disk image is malformed > > > > > > At this point, it seems there is no way for me rerun the playbook to fix > it > > because the yum repo info somehow got corrupted. Is there anyway to fix > it? > > (Imagine there are tens of machines, I can't log into the machines and > > manually fix the repo by manually running yum commands) > > > > > > If the above question sounds a reasonable question to Ansible, I'd like > to > > go one step further. The idempotency is a goal for Ansible, how can I > get it > > in a world that something weird could happen during software > installation. > > > > > > > > > > -- > > 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/6236f3a7-d6c6-4783-96be-04b416677988%40googlegroups.com > . > > 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/CAK5eLPQDsoKswy-S-xC5nBUdogCf4kvdi_UA7EPwBfqR%3DmMQcQ%40mail.gmail.com > . > 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/CAEVJ8QPw5sv72Ksne1oJ%2BKFh%3DtdvfCphO8YHVOw%2Bvf1GoOEfDA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
