If you look at the output, you can see an rc value of 8. This mean your command has returned a non-zero value. Usually when a command completes succesfully, you would have a zero. Since you don’t have this, underneath the register line add this:
and see if that helps. You may also have to adapt that further for other error codes. For example, when I had this issue with writing playbooks for using yum, I had something like this:
so you may want to run the playbook on different systems, and see what the rc value returns to adapt this. So at least for the beginning this would now look like:
you can of course, also after running nvidia-detectmanually then immediately use:
echo $?
to see what code is returned, whether it is 0, 8 or something else on each of your systems. Can be quicker than running the playbook, unless the playbook returns different values. But it should be similar.
since it still reports a working supported graphics card, and thus the value is effectively a success. We are basically telling ansible to consider 7 and 8 as a success, similar to a code 0 that would normally get returned. It could well be for each different GPU, they return a different success code. But who knows