--- - name: "Install EPEL repositories" ansible.builtin.shell: cmd: "amazon-linux-extras install -y epel" - name: "Install GDR Dependencies" ansible.builtin.yum: name: - git - make - check - check-devel - subunit - subunit-devel state: present - name: Clone Nvidia GDR Copy repository ansible.builtin.git: repo: https://github.com/NVIDIA/gdrcopy.git dest: /tmp/gdrcopy - name: "Install Nvidia GDR Copy" ansible.builtin.shell: | mkdir /usr/local/gdrcopy make CUDA=/usr/local/cuda prefix=/usr/local/gdrcopy all install ./insmod.sh args: chdir: /tmp/gdrcopy - name: Adding GDRCopy path ansible.builtin.blockinfile: path: /etc/profile.d/gdrcopy.sh create: yes block: | export PATH=$PATH:/usr/local/gdrcopy/bin export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/gdrcopy/lib export CPATH=$CPATH:/usr/local/gdrcopy/include