Fixes errors when running in check mode

This commit is contained in:
Jan Beilicke 2020-11-26 21:55:39 +00:00
parent 3c2f642820
commit 59e838a3e4

View file

@ -13,10 +13,13 @@
- 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
- debug:
msg: "{{ locale_lang }}"
var: locale_lang
- name: Set default locale
command: localectl set-locale LANG={{ locales_default }}
when: locale_lang != locales_default
when:
- locale_lang is defined
- locale_lang != locales_default