Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kiwix-serve will no start if a ZIM failed to be installed. #2

Open
letompouce opened this issue Sep 2, 2020 · 0 comments
Open

kiwix-serve will no start if a ZIM failed to be installed. #2

letompouce opened this issue Sep 2, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@letompouce
Copy link
Member

TASK [package_management : shell] **********************************************
 [WARNING]: Consider using the file module with state=link rather than running
ln.  If you need to use command because file is insufficient you can add
warn=False to this command task or set command_warnings=False in ansible.cfg to
get rid of this message.
failed: [localhost] (item=maths-et-tiques.fr) => {"changed": true, "cmd": "ln -s /mnt/kiwix/zim/other/la_chaine_de_maths_et_tiques_fr_all_2020-07.zim /var/ideascube/kiwix/maths-et-tiques.fr.zim\n kiwix-manage /var/ideascube/kiwix/library.xml add /var/ideascube/kiwix/maths-et-tiques.fr.zim", "delta": "0:00:00.750560", "end": "2020-09-01 19:24:41.525281", "item": "maths-et-tiques.fr", "msg": "non-zero return code", "rc": 1, "start": "2020-09-01 19:24:40.774721", "stderr": "Invalid /var/ideascube/kiwix/maths-et-tiques.fr.zim : Invalid magic number\nUnable to build or save library file '/var/ideascube/kiwix/library.xml'", "stderr_lines": ["Invalid /var/ideascube/kiwix/maths-et-tiques.fr.zim : Invalid magic number", "Unable to build or save library file '/var/ideascube/kiwix/library.xml'"], "stdout": "", "stdout_lines": []}
changed: [localhost] => (item=bouquineux.fr)
changed: [localhost] => (item=universcience-tv.fr)
changed: [localhost] => (item=biologie-tout-compris.fr)
changed: [localhost] => (item=wikipedia.fr)
changed: [localhost] => (item=cest-pas-sorcier.fr)
changed: [localhost] => (item=nota-bene.fr)
changed: [localhost] => (item=micmaths.fr)
changed: [localhost] => (item=mondial-tissus.fr)
...ignoring

The task reads:

    - shell: |
        ln -s /mnt/kiwix{{ Kiwix.all[item]['url'].split("download.kiwix.org")[-1] }} /var/ideascube/kiwix/{{ item }}.zim
        kiwix-manage /var/ideascube/kiwix/library.xml add /var/ideascube/kiwix/{{ item }}.zim
      with_items: "{{ device_kiwix_pkg }}"
      notify: Start kiwix serve
      ignore_errors: True

Because the task failed, the handler will not be called, and kiwix-serve will not be started.

According to the documentation:

When a task fails on a host, handlers which were previously notified will not be run on that host.

It doesn't explicitely talks about ignore_errors: true, so we can assume handlers will NEVER be called. Which is confirmed by the fact we don't have any HANDLER task at the end of the play.

@letompouce letompouce added the bug Something isn't working label Sep 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant