---
- name: Generate locales
  lineinfile: dest=/etc/locale.gen line="{{ item }}" state=present
  with_items:
  - en_GB.UTF-8 UTF-8
  - en_US.UTF-8 UTF-8
  notify:
  - regenerate locales
  - set locale

- name: Install common system packages
  pacman: name={{ item }} state=present
  with_items:
  - archey3
  - autoconf
  - automake
  - cronie
  - fortune-mod
  - gcc
  - git
  - make
  - wget

- name: Enable system services
  service: name={{ item }} enabled=yes state=started
  with_items:
  - cronie.service

- name: Install pacman -Sy to cron
  cron: name="Update pacman repositories" job="pacman -Sy" hour=0 state=present

- name: Install command-not-found hook
  pacman: name=pkgfile state=present
  notify:
  - update pkgfile db
  - install pkgfile cron

- name: Process and copy Bash sources
  template: src={{ item }}.j2 dest=/usr/local/etc/{{ item }}
  with_items:
  - bash.bashrc
  - bash_aliases.bash
  - bash_colours.bash

- name: Install fstab
  template: src=fstab.j2 dest=/etc/fstab

- name: Enable bash.bashrc
  lineinfile:
    dest=/etc/bash.bashrc
    line="[ -f /usr/local/etc/bash.bashrc ] && . /usr/local/etc/bash.bashrc"
    state=present

---
- name: Generate locales
  lineinfile: dest=/etc/locale.gen line="{{ item }}" state=present
  with_items:
  - en_GB.UTF-8 UTF-8
  - en_US.UTF-8 UTF-8
  notify:
  - regenerate locales
  - set locale

- name: Install common system packages
  pacman: name={{ item }} state=present
  with_items:
  - archey3
  - autoconf
  - automake
  - cronie
  - fortune-mod
  - gcc
  - git
  - make
  - wget

- name: Enable system services
  service: name={{ item }} enabled=yes state=started
  with_items:
  - cronie.service

- name: Install pacman -Sy to cron
  cron: name="Update pacman repositories" job="pacman -Sy" minute=0 state=present

- name: Install command-not-found hook
  pacman: name=pkgfile state=present
  notify:
  - update pkgfile db
  - install pkgfile cron

- name: Process and copy Bash sources
  template: src={{ item }}.j2 dest=/usr/local/etc/{{ item }}
  with_items:
  - bash.bashrc
  - bash_aliases.bash
  - bash_colours.bash

- name: Install fstab
  template: src=fstab.j2 dest=/etc/fstab

- name: Enable bash.bashrc
  lineinfile:
    dest=/etc/bash.bashrc
    line="[ -f /usr/local/etc/bash.bashrc ] && . /usr/local/etc/bash.bashrc"
    state=present

Fix cron timing (original intent was to run it every hour)
Fix cron timing (original intent was to run it every hour)
