For newer versions of Ansible, the keyword "include" has to be replaced with "include_tasks" in the yaml configuration to make the ansible installation of the data node work. i.e.:
- name: Install THREDDS
- include: thredds_install.yml
- include_tasks: thredds_install.yml
when: "'data' in group_names and thredds_enabled"
My version of ansible/pythong:
$>ansible --version
ansible [core 2.17.0]
...
python version = 3.12.3 | packaged by Anaconda, Inc. | (main, May 6 2024, 14:46:42) [Clang 14.0.6 ]