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

On Monday, June 14, 2021 at 9:32:13 AM UTC-4 lift...@gmail.com wrote:

> 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:
> (<unknown>): 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
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/7eb42f3c-142b-4b9f-9795-9e8ee306f099n%40googlegroups.com.

Reply via email to