--- - name: Install baseline Linux packages ansible.builtin.package: name: "{{ local_user_required_packages }}" state: present - name: Install k3s-specific packages ansible.builtin.package: name: "{{ local_user_k3s_packages }}" state: present when: - local_user_k3s_packages | length > 0 - (k3s_host | default(false) | bool) or ('k3s_hosts' in group_names) - name: Ensure kubeadm group exists ansible.builtin.group: name: "{{ k3s_kubeconfig_group | default('kubeadm') }}" state: present - name: Ensure local user pi exists ansible.builtin.user: name: pi state: present shell: /bin/bash home: /home/pi create_home: yes groups: "{{ k3s_kubeconfig_group | default('kubeadm') }}" append: true - name: Ensure /home/pi directory exists and has correct ownership ansible.builtin.file: path: /home/pi state: directory owner: pi group: pi mode: '0755' - name: Install default screen configuration ansible.builtin.copy: src: screenrc dest: "{{ item.path }}" owner: "{{ item.owner | default('root') }}" group: "{{ item.group | default(item.owner | default('root')) }}" mode: "{{ item.mode | default('0644') }}" loop: "{{ local_user_screenrc_targets }}"