Ansible variables

Can Someone help me with tow Ansible Files

I need the following Configuration

php::version::current::installed ‘8.1.11’ → test.yml (php_version: 'read_from_puppet_file) → remember this variable or write it in a Jinja template → Include the variable in a Ruby file at a specific location

This is almost zero context.
You need to do a little more effort describing what this is about.