Ansible Yum module to install multiple RPMs from local filesystem

I am trying to install Libreoffice using ansible yum module

Downloaded from https://downloadarchive.documentfoundation.org/libreoffice/old/4.4.1.2/rpm/x86_64/LibreOffice_4.4.1.2_Linux_x86-64_rpm.tar.gz
Extracted and all libreoffice rpms kept at /home//LibreOffice_4.4.1.2_Linux_x86-64_rpm/RPMS/

  • yum:
    name: “/home/LibreOffice_4.4.1.2_Linux_x86-64_rpm/RPMS/*.rpm”
    state: present

above task failing with error
fatal: [localhost]: FAILED! => {“changed”: false, “failed”: true, “msg”: “No Package file matching ‘/home/LibreOffice_4.4.1.2_Linux_x86-64_rpm/RPMS/*.rpm’ found on system”, “rc”: 0, “results”: }

Need help

- find:
     paths: /home/LibreOffice_4.4.1.2_Linux_x86-64_rpm/RPMS
     patterns: *.rpm
   register: file_list

- yum
     name: "{{ file_list.files | map(attribute='path') | list }}"