--- - name: Enable services on installed system. command: arch-chroot {{ partitioning_root_mount_point }} systemctl enable {{ item }} with_items: - sshd - NetworkManager - fstrim.timer changed_when: true - name: Make sure root's .ssh directory exists. file: state: directory path: "{{ partitioning_root_mount_point }}/root/.ssh" owner: root group: root mode: 0700 - name: Make sure temporary key is in root's authorized_keys authorized_key: state: present user: root path: "{{ partitioning_root_mount_point }}/root/.ssh/authorized_keys" key: "{{ tmp_pub_key }}" manage_dir: true - name: Update root password. command: arch-chroot {{ partitioning_root_mount_point }} sh -c "echo root:{{ configure_root_password }} | chpasswd" changed_when: true