Failed to create temporary directory. ansible aws ssm

- name: install aws-cli
  hosts: all
  gather_facts: false
  become: true
  vars:
    ansible_connection: community.aws.aws_ssm
    ansible_aws_ssm_bucket_name: ***************
    ansible_aws_ssm_region: eu-west-3
    ansible_aws_ssm_plugin: "/etc/profiles/per-user/dmadmin/bin/session-manager-plugin"

  tasks:
    - name: install neofetch
      apt:
        name: neofetch
        state: present

To fix:

either

    ansible_ssh_user: ""

or

[defaults]
remote_tmp = /tmp/.ansible/tmp