---
## ----------------
## Install packages
## ----------------
- name: install packages with pacman
  pacman:
    pkg: "{{ pacman_packages }}"
    state: present

# TODO: how to do aur/yaourt packages? create module or use shell/command module

- name: start/enable system services
  systemd:
    name: "{{ item }}"
    enabled: yes
    state: started
  loop: "{{ system_services }}"

- name: start/enable user services
  become: no
  systemd:
    name: "{{ item }}"
    enabled: yes
    state: started
    user: yes
  loop: "{{ user_services }}"
  failed_when: no # TODO: this fails on very first run because config files arent installed yet

- name: ignore pressing the power button
  ini_file:
    path: /etc/systemd/logind.conf
    section: Login
    option: HandlePowerKey
    value: ignore
    state: present
    backup: yes

---
## ----------------
## Install packages
## ----------------
- name: install packages with pacman
  pacman:
    pkg: "{{ pacman_packages }}"
    state: present

# TODO: how to do aur/yaourt packages? create module or use shell/command module

- name: start/enable system services
  systemd:
    name: "{{ item }}"
    enabled: yes
    state: started
  loop: "{{ system_services }}"

- name: start/enable user services
  become: no
  systemd:
    name: "{{ item }}"
    enabled: yes
    state: started
    scope: user
  loop: "{{ user_services }}"
  failed_when: no # TODO: this fails on very first run because config files arent installed yet

- name: ignore pressing the power button
  ini_file:
    path: /etc/systemd/logind.conf
    section: Login
    option: HandlePowerKey
    value: ignore
    state: present
    backup: yes

Update usage of systemd module to remove deprecations
Update usage of systemd module to remove deprecations
