<commit_before>---
# Setup of mpd for particular user, using systemd user session.
# See also: https://wiki.archlinux.org/index.php/Music_Player_Daemon

- name: Install packages
  dnf: name={{ item }} state=present
  with_items:
    - mpd
    - mpc
    - ncmpc

- assert:
    that:
      - mpd_username is defined

- debug:
    msg: "Setting up mpd for {{ mpd_username }} user account."

- name: User setup of mpd
  block:

    - name: Create user mpd directory<commit_msg>mpd: allow the role to be run under non root user<commit_after>---
# Setup of mpd for particular user, using systemd user session.
# See also: https://wiki.archlinux.org/index.php/Music_Player_Daemon

- name: Install packages
  dnf: name={{ item }} state=present
  with_items:
    - mpd
    - mpc
    - ncmpc
  when: ansible_user == "root"

- assert:
    that:
      - mpd_username is defined

- debug:
    msg: "Setting up mpd for {{ mpd_username }} user account."

- name: User setup of mpd
  block:

    - name: Create user mpd directory
{'fraction_non_alphanumeric': 0.10661401776900296, 'fraction_numerical': 0.0, 'mean_word_length': 2.797752808988764, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3481666', 'n_tokens_mistral': 339, 'n_tokens_neox': 338, 'n_words': 112}