From: Oleg Broytman Date: Fri, 19 Jul 2019 18:14:57 +0000 (+0300) Subject: Fix(debian/init-system): Ignore error from `grep` X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=fbdfc427c23976ef9ca53a43eea1fdb577c153de;p=ansible.git Fix(debian/init-system): Ignore error from `grep` `grep` returns an error even if we only ask for count. --- diff --git a/playbooks/debian/roles/init-system/tasks/main.yml b/playbooks/debian/roles/init-system/tasks/main.yml index 0e1db28..3159aaa 100644 --- a/playbooks/debian/roles/init-system/tasks/main.yml +++ b/playbooks/debian/roles/init-system/tasks/main.yml @@ -31,7 +31,7 @@ when: "inventory_hostname in ('localhost', 'iskra-aviel.phdru.name')" - name: Check locales - command: grep -c '^ru_RU.KOI8-R' /etc/locale.gen + shell: "grep -c '^ru_RU.KOI8-R' /etc/locale.gen || :" register: has_locales - debug: msg: "Creating and regenerating locales..."