Skip to content

Instantly share code, notes, and snippets.

@bobquest33
Last active October 7, 2019 18:11
Show Gist options
  • Save bobquest33/70f60f22f97bd69ca3da9337506aa4e2 to your computer and use it in GitHub Desktop.
Save bobquest33/70f60f22f97bd69ca3da9337506aa4e2 to your computer and use it in GitHub Desktop.
Ansible Playbook for setting and checking if time reflects based on timezone
- hosts: raspi
become: yes
vars:
timezone_zone: Asia/Kolkata # valid tz database string
roles:
- role: anxs.timezone
post_tasks:
- name: get current time
shell: date
register: tz_op
- debug: msg="{{ ansible_default_ipv4.address }} - {{ tz_op.stdout }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment