Error in block declaration

I have a playbook that is being included in a role I’m creating:

  • name: Set up permissions
    include_tasks: sitepermissions.yml
    loop: “{{ folders }}”

In sitepermissions.yml, I’m trying to define a block:

  • name: Create Temp Area
    block:

  • name: Create {{ folders.site }} Temp Directory
    file:
    path: “/path/to/temp”
    state: directory
    mode: 0750
    owner: root
    group: “{{ folders.group }}”

  • name: Set sticky bit on {{ folders.site }} Temp Directory
    file:
    path: “/path/to/temp”
    state: directory
    mode: g+s

  • name: Set ACL on {{ folders.site }} EFSTS Directory
    acl:
    path: “/path/to/temp”
    entity: “{{ sitegroup }}”
    etype: group
    permissions: rx
    default: yes
    state: present

when: “{{ folders.createtemp }}” | bool

When the playbook runs, I get the error:
(): did not find expected comment or line break while scanning a block scalar at line 1220 column 32

Any ideas on what could be wrong with my block statement?

Thanks,
Harry

I believe I figured out my issues. Since I was including the 2nd playbook, references to the main variables had to be {{ item.group }} instead of {{ folders.group }}, etc. Also, in the “when” clause, I found that I needed to remove the curly braces and have the entire check in quotes. Then everything worked.

Thanks,
Harry