---
- name: Copy pacman configuration file
  copy: src=pacman.conf dest=/etc/pacman.conf

- name: Refresh pacman mirrors
  pacman: update_cache=yes

- name: Set the hostname
  hostname: name={{ hostname }}
  when: hostname is defined

- name: Set kernel parameters
  lineinfile: "dest=/etc/default/grub
              regexp=^GRUB_CMDLINE_LINUX_DEFAULT
              state=present
              line='GRUB_CMDLINE_LINUX_DEFAULT=\"{{ kernel_parameters }}\"'"
  when: kernel_parameters is defined and bootloader == 'grub'
  notify:
    - rebuild grub
  tags:
    - kernelparams

- include: shell.yml
- include: user.yml
- include: sudo.yml
- include: packages.yml
- include: journal.yml
