--- - name: 'Install base packages for Debian' apt: name: - '{{ item }}' state: 'present' update_cache: true loop: - 'less' - 'vim' - 'tmux' - 'neofetch' - 'iotop-c' - 'tcpdump' - 'rsync' - 'python3-pip' - 'docker.io' - 'docker-compose' - name: 'Install base packages for Python' pip: name: '{{ item }}' loop: - 'docker' - 'pexpect' - name: "Create the user '{{ base_user }}'" user: name: '{{ base_user }}' state: 'present' shell: '/bin/bash' uid: 1001 password: '{{ base_user_password | password_hash("sha512") }}' create_home: true generate_ssh_key: true groups: 'sudo, docker' append: true - name: 'Allow passwordless sudo for this {{ base_user }}' lineinfile: path: '/etc/sudoers' state: 'present' regexp: '^%{{ base_user }}\s+ALL=' line: '%{{ base_user }} ALL=(ALL) NOPASSWD: ALL' validate: '/usr/sbin/visudo -cf %s' - block: - name: 'Install kernel headers for currently installed kernel' apt: name: 'linux-headers-current-rockchip64' state: 'present' - name: 'Install zfs modules and package' apt: name: '{{ item }}' state: 'present' default_release: 'bullseye-backports' loop: - 'zfs-dkms' - 'zfsutils-linux' when: 'base_hardware == "rockchip64"'