Skip to content

Commit

Permalink
Arch Linux support (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
Asher256 authored and yatesr committed Sep 25, 2017
1 parent 590b0dd commit 02d7763
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tasks/timezone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@
tags: ['timezone']
become: yes

- name: Install tzdata for Archlinux based distros
pacman: name={{timezone_package}}
state=present
when: ansible_os_family == 'Archlinux' or ansible_os_family == 'Arch Linux'
tags: ['timezone']
become: yes

- name: Set timezone config
template: src="timezone-{{ansible_os_family}}.j2"
dest={{timezone_file}}
Expand Down
1 change: 1 addition & 0 deletions templates/timezone-Arch Linux.j2
1 change: 1 addition & 0 deletions templates/timezone-Archlinux.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{timezone}}
1 change: 1 addition & 0 deletions vars/Arch Linux.yml
6 changes: 6 additions & 0 deletions vars/Archlinux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
timezone_package: 'tzdata'
zoneinfo_dir: '/usr/share/zoneinfo/'
localtime_file: '/etc/localtime'
timezone_file: '/etc/timezone'
timezone_config: 'timezone-Archlinux.j2'

0 comments on commit 02d7763

Please sign in to comment.