---
- name: Set up env
  vars:
    XDG_DATA_DIRS: /usr/local/share/:/usr/share/
  hosts: localhost
  connection: local
  become: false
  tasks:
    - name: Set up /etc/environment
      become: true
      ansible.builtin.lineinfile:
        path: /etc/environment
        regex: ^XDG_DATA_DIRS=
        line: XDG_DATA_DIRS={{ XDG_DATA_DIRS }}
