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..."
+ changed_when: true # Force notification
notify: Configure locales
when: has_locales.stdout == "0"