소스 검색

Setting timezone to UTC

fengor 10 년 전
부모
커밋
224e8cb339
1개의 변경된 파일10개의 추가작업 그리고 4개의 파일을 삭제
  1. 10
    4
      roles/common/tasks/main.yml

+ 10
- 4
roles/common/tasks/main.yml 파일 보기

@@ -28,6 +28,16 @@
28 28
     - vim
29 29
     - zsh
30 30
 
31
+- name: Set timezone to UTC
32
+  action: shell echo Etc/UTC > /etc/timezone
33
+
34
+- name: Set localtime to UTC
35
+  file: src=/usr/share/zoneinfo/Etc/UTC dest=/etc/localtime
36
+
37
+- name: Reconfigure tzdata
38
+  action: command dpkg-reconfigure -f noninteractive tzdata
39
+  when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
40
+
31 41
 - name: Install unattended upgrades (Debian/Ubuntu only)
32 42
   apt: pkg=unattended-upgrades state=installed
33 43
   when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
@@ -63,7 +73,3 @@
63 73
 - include: ufw.yml tags=ufw
64 74
 - include: security.yml tags=security
65 75
 - include: ntp.yml tags=ntp
66
-- include: google_auth.yml tags=google_auth
67
-  when: ansible_distribution_release != 'trusty'
68
-- include: google_auth_mod.yml tags=google_auth
69
-  when: ansible_distribution_release == 'trusty'

Loading…
취소
저장