Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
---
- name: install locale packages
apt:
force_apt_get: true
install_recommends: false
name: "{{ locale_packages }}"
register: apt_status
retries: 60
until: apt_status is success or ('Failed to lock apt for exclusive operation' not in apt_status.msg and '/var/lib/dpkg/lock' not in apt_status.msg)
- name: generate locale
locale_gen:
name: "{{ init_locale }}"
- name: set locale
notify: update locale
copy:
dest: /etc/default/locale
content: |
LANG={{ init_locale }}
LANGUAGE={{ init_locale }}
LC_ALL={{ init_locale }}
- name: set locale.gen
notify: update locale
lineinfile:
path: /etc/locale.gen
regexp: '^(?:# )?({{ init_locale }}.*)$'
backrefs: true
line: '\1'
- name: set timezone
notify: restart cron
timezone:
name: "{{ init_timezone }}"
...