Effectively change the timezone

This commit is contained in:
Jérémy Lecour 2017-07-12 10:23:21 +02:00 committed by Jérémy Lecour
parent a318e6065c
commit ce37282feb
2 changed files with 11 additions and 12 deletions

View file

@ -52,6 +52,10 @@
name: apache2
state: reloaded
- name: restart cron
service:
name: cron
state: restarted
- name: newaliases
command: newaliases

View file

@ -25,19 +25,11 @@
when: evolinux_system_locales and default_locales | changed
- name: Setting default timezone
lineinfile:
dest: /etc/timezone
regexp: '^\w+/\w+$'
line: "{{ evolinux_system_timezone | mandatory }}"
insertbefore: BOF
create: yes
register: change_timezone
timezone:
name: "{{ evolinux_system_timezone | mandatory }}"
notify: restart cron
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
# non-interactively (like tzdata ↑)
@ -48,7 +40,10 @@
dest: /etc/vim/vimrc
regexp: 'let g:skip_defaults_vim ='
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
alternatives: