-
-
Save wsaribeiro/44416fb865ccd8d9e1ad8f618b63ac7a to your computer and use it in GitHub Desktop.
Revisions
-
jerm revised this gist
Jun 3, 2014 . No changes.There are no files selected for viewing
-
jerm revised this gist
Jun 3, 2014 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,9 +12,9 @@ tasks: - name: check current timezone shell: cat /etc/timezone register: current_zone - name: Set timezone variables copy: content={{my_zone}} dest=/etc/timezone -
jerm revised this gist
Jun 3, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ tasks: - name: check current timezone shell: bash -c "[[ $(TZ='America/New_York' date | awk '{print $5}') == $(date | awk '{print $5}') ]]" register: current_zone - debug: msg="{{current_zone}}" - name: Set timezone variables -
jerm created this gist
Jun 3, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,30 @@ --- - name: Group by Distribution hosts: all tasks: - group_by: key={{ansible_distribution}} - name: Set Time Zone hosts: Ubuntu gather_facts: False vars: - my_zone: 'America/New_York' tasks: - name: check current timezone shell: "[[ $(TZ='America/New_York' date | awk '{print $5}') == $(date | awk '{print $5}') ]]" register: current_zone - debug: msg="{{current_zone}}" - name: Set timezone variables copy: content={{my_zone}} dest=/etc/timezone owner=root group=root mode=0644 backup=yes when: current_zone.stdout != my_zone notify: - update timezone handlers: - name: update timezone command: dpkg-reconfigure --frontend noninteractive tzdata