mirror of
https://github.com/pigmonkey/spark.git
synced 2026-07-28 18:22:15 +00:00
autoset timezone via localtime
If you happen to have a VPN in a different timezone that is set as a trusted network, things may get a little weird.
This commit is contained in:
parent
e6878d8e08
commit
13fb6f0db4
3 changed files with 29 additions and 0 deletions
|
|
@ -111,3 +111,6 @@ fingerprint: False
|
|||
|
||||
tor:
|
||||
run_on: trusted
|
||||
|
||||
localtime:
|
||||
run_on: trusted
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@
|
|||
- { role: calibre, tags: ['calibre'] }
|
||||
- { role: aws, tags: ['aws'] }
|
||||
- { role: parcimonie, tags: ['parcimonie'], when: "tor is defined" }
|
||||
- { role: localtime, tags: ['localtime'], when: "localtime is defined" }
|
||||
vars_prompt:
|
||||
- name: user_password
|
||||
prompt: "Enter desired user password"
|
||||
|
|
|
|||
25
roles/localtime/tasks/main.yml
Normal file
25
roles/localtime/tasks/main.yml
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
- name: Install localtime
|
||||
aur: name=localtime-git user={{ user.name }}
|
||||
tags:
|
||||
- aur
|
||||
|
||||
- name: Enable and start localtime
|
||||
service: name=localtime enabled=yes state=started
|
||||
when: localtime.run_on == "all"
|
||||
|
||||
- name: Remove localtime from trusted unit list
|
||||
lineinfile: dest=/usr/local/etc/trusted_units
|
||||
state=absent
|
||||
line=localtime.service
|
||||
when: localtime.run_on == "all"
|
||||
|
||||
- name: Disable localtime
|
||||
service: name=localtime enabled=no
|
||||
when: localtime.run_on == "trusted"
|
||||
|
||||
- name: Add localtime to trusted unit list
|
||||
lineinfile: dest=/usr/local/etc/trusted_units
|
||||
state=present
|
||||
line=localtime.service
|
||||
when: localtime.run_on == "trusted"
|
||||
Loading…
Add table
Add a link
Reference in a new issue