forked from evolix/ansible-roles
Effectively change the timezone
This commit is contained in:
parent
a318e6065c
commit
ce37282feb
|
@ -52,6 +52,10 @@
|
||||||
name: apache2
|
name: apache2
|
||||||
state: reloaded
|
state: reloaded
|
||||||
|
|
||||||
|
- name: restart cron
|
||||||
|
service:
|
||||||
|
name: cron
|
||||||
|
state: restarted
|
||||||
|
|
||||||
- name: newaliases
|
- name: newaliases
|
||||||
command: newaliases
|
command: newaliases
|
||||||
|
|
|
@ -25,19 +25,11 @@
|
||||||
when: evolinux_system_locales and default_locales | changed
|
when: evolinux_system_locales and default_locales | changed
|
||||||
|
|
||||||
- name: Setting default timezone
|
- name: Setting default timezone
|
||||||
lineinfile:
|
timezone:
|
||||||
dest: /etc/timezone
|
name: "{{ evolinux_system_timezone | mandatory }}"
|
||||||
regexp: '^\w+/\w+$'
|
notify: restart cron
|
||||||
line: "{{ evolinux_system_timezone | mandatory }}"
|
|
||||||
insertbefore: BOF
|
|
||||||
create: yes
|
|
||||||
register: change_timezone
|
|
||||||
when: evolinux_system_timezone != False
|
when: evolinux_system_timezone != False
|
||||||
|
|
||||||
- name: Reconfigure tzdata
|
|
||||||
command: dpkg-reconfigure --frontend noninteractive tzdata
|
|
||||||
when: evolinux_system_timezone != False and change_timezone | changed
|
|
||||||
|
|
||||||
# TODO : find a way to force the console-data configuration
|
# TODO : find a way to force the console-data configuration
|
||||||
# non-interactively (like tzdata ↑)
|
# non-interactively (like tzdata ↑)
|
||||||
|
|
||||||
|
@ -48,7 +40,10 @@
|
||||||
dest: /etc/vim/vimrc
|
dest: /etc/vim/vimrc
|
||||||
regexp: 'let g:skip_defaults_vim ='
|
regexp: 'let g:skip_defaults_vim ='
|
||||||
line: 'let g:skip_defaults_vim = 1'
|
line: 'let g:skip_defaults_vim = 1'
|
||||||
when: evolinux_system_vim_skip_defaults
|
when:
|
||||||
|
- evolinux_system_vim_skip_defaults
|
||||||
|
- ansible_distribution == "Debian"
|
||||||
|
- ansible_distribution_major_version | version_compare('9.0', '>=')
|
||||||
|
|
||||||
- name: Setting vim as default editor
|
- name: Setting vim as default editor
|
||||||
alternatives:
|
alternatives:
|
||||||
|
|
Loading…
Reference in a new issue