Skip to content

Commit

Permalink
With input from #1, thanks to @laurent-kling, Ubuntu uses a different…
Browse files Browse the repository at this point in the history
… path.
  • Loading branch information
robertdebock committed Feb 18, 2019
1 parent 1e4d479 commit 5e28dbd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
- name: configure locale.conf
template:
src: locale.conf.j2
dest: /etc/locale.conf
dest: "{{ locale_configuration_file }}"
notify:
- localectl set-locale

Expand Down
7 changes: 7 additions & 0 deletions vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,10 @@ _locale_requirements:
- locales-all

locale_requirements: "{{ _locale_requirements[ansible_distribution ~ '-' ~ ansible_distribution_major_version] | default(_locale_requirements[ansible_distribution] | default(_locale_requirements['default'])) }}"

_locale_configuration_file:
default: /etc/locale.conf
Debian: /etc/default/locale
Ubuntu: /etc/default/locale

locale_configuration_file: "{{ _locale_configuration_file[ansible_distribution] | default(_locale_configuration_file['default']) }}"

0 comments on commit 5e28dbd

Please sign in to comment.