Skip to content

Instantly share code, notes, and snippets.

@hatan4ik
Created January 24, 2019 20:32
Show Gist options
  • Save hatan4ik/127f689e9089ec206b0c030dd936cea2 to your computer and use it in GitHub Desktop.
Save hatan4ik/127f689e9089ec206b0c030dd936cea2 to your computer and use it in GitHub Desktop.

Revisions

  1. @tracphil tracphil created this gist Jul 22, 2014.
    10 changes: 10 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    ---

    - name: Check current timezone
    shell: awk -F\" '{ print $2}' /etc/sysconfig/clock
    register: current_zone
    changed_when: False

    - name: Set UTC timezone
    file: src=/usr/share/zoneinfo/{{ timezone }} dest=/etc/localtime state=link force=yes
    when: current_zone.stdout != '{{ timezone }}'