Skip to content

Instantly share code, notes, and snippets.

@garethrees
Last active October 14, 2020 19:44

Revisions

  1. garethrees revised this gist May 16, 2013. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion gistfile1.yml
    Original file line number Diff line number Diff line change
    @@ -8,11 +8,12 @@
    gather_facts: False
    tasks:
    - name: Set timezone variables
    copy: content='US/Pacific'
    copy: content='America/Los_Angeles'
    dest=/etc/timezone
    owner=root
    group=root
    mode=0644
    backup=yes
    notify:
    - update timezone
    handlers:
  2. garethrees revised this gist May 16, 2013. 1 changed file with 11 additions and 0 deletions.
    11 changes: 11 additions & 0 deletions gistfile2.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    vagrant@us:~$ ll /etc/ | grep timezone
    -rw-r--r-- 1 root root 20 May 16 06:27 timezone
    -rw-r--r-- 1 root root 20 May 16 06:22 timezone.2013-05-16@06:24~
    -rw-r--r-- 1 root root 20 May 16 06:24 timezone.2013-05-16@06:27~
    vagrant@us:~$ cat /etc/timezone
    America/Los_Angeles
    vagrant@us:~$ cat /etc/timezone.2013-05-16@06:24~
    America/Los_Angeles
    vagrant@us:~$ cat /etc/timezone.2013-05-16@06:27~
    America/Los_Angeles
    vagrant@us:~$
  3. garethrees created this gist May 16, 2013.
    20 changes: 20 additions & 0 deletions gistfile1.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    - name: Group by Distribution
    hosts: all
    tasks:
    - group_by: key=${ansible_distribution}

    - name: Set Time Zone
    hosts: Ubuntu
    gather_facts: False
    tasks:
    - name: Set timezone variables
    copy: content='US/Pacific'
    dest=/etc/timezone
    owner=root
    group=root
    mode=0644
    notify:
    - update timezone
    handlers:
    - name: update timezone
    command: dpkg-reconfigure --frontend noninteractive tzdata