insert the variables in the playbook using:
hosts: "{{ nodes }}"
then run the playbook with the -e option and show the variables content
ansible-playbook -e nodes=hostname playbook_name.yaml
insert the variables in the playbook using:
hosts: "{{ nodes }}"
then run the playbook with the -e option and show the variables content
ansible-playbook -e nodes=hostname playbook_name.yaml