- name: Check locales 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" - debug: msg: "Locales has already been created" when: has_locales.stdout != "0"