Looping through hosts from an inventory group in a group_vars file
Yes. It is possible to create a YAML data structure with Jinja and read the variable in with the filter from_yaml.

The play

- hosts: group1
  vars:
    script_dir: /tmp
  tasks:
    - debug:
        var: filewatches


with the group_vars

$ cat group_vars/group1.yml 
filewatches: "{{ filewatches_var|from_yaml }}"
filewatches_var: |
    {% for host in groups['worker'] %}
    - type: "copy"
      directory_name: "{{ host }}"
      shell_script: "{{ script_dir }}/ascript.sh"
    {% endfor %}


and with the inventory

$ cat hosts
...
group1:
  hosts:
    test_01

group2:
  hosts:
    test_02
    test_03


gives

ok: [test_01] =&gt; {
    "filewatches": [
        {
            "directory_name": "test_02", 
            "shell_script": "/tmp/ascript.sh", 
            "type": "copy"
        }, 
        {
            "directory_name": "test_03", 
            "shell_script": "/tmp/ascript.sh", 
            "type": "copy"
        }
    ]
}