diff --git a/tasks/locales-debian.yml b/tasks/locales-debian.yml index fecca67..a1d5be5 100644 --- a/tasks/locales-debian.yml +++ b/tasks/locales-debian.yml @@ -13,7 +13,7 @@ - name: Extract LANG from current locale configuration set_fact: locale_lang: "{{ locale_status.stdout | regex_search('LANG=([^\n]+)', '\\1') | first }}" - when: local_status.stdout is defined + when: not ansible_check_mode - debug: var: locale_lang @@ -21,5 +21,5 @@ - name: Set default locale command: localectl set-locale LANG={{ locales_default }} when: - - locale_lang is defined + - not ansible_check_mode - locale_lang != locales_default \ No newline at end of file