Fixes errors when running in check mode
This commit is contained in:
parent
3c2f642820
commit
59e838a3e4
1 changed files with 5 additions and 2 deletions
|
@ -13,10 +13,13 @@
|
||||||
- name: Extract LANG from current locale configuration
|
- name: Extract LANG from current locale configuration
|
||||||
set_fact:
|
set_fact:
|
||||||
locale_lang: "{{ locale_status.stdout | regex_search('LANG=([^\n]+)', '\\1') | first }}"
|
locale_lang: "{{ locale_status.stdout | regex_search('LANG=([^\n]+)', '\\1') | first }}"
|
||||||
|
when: local_status.stdout is defined
|
||||||
|
|
||||||
- debug:
|
- debug:
|
||||||
msg: "{{ locale_lang }}"
|
var: locale_lang
|
||||||
|
|
||||||
- name: Set default locale
|
- name: Set default locale
|
||||||
command: localectl set-locale LANG={{ locales_default }}
|
command: localectl set-locale LANG={{ locales_default }}
|
||||||
when: locale_lang != locales_default
|
when:
|
||||||
|
- locale_lang is defined
|
||||||
|
- locale_lang != locales_default
|
Loading…
Add table
Reference in a new issue