TypeError using the script action in a roles or include?

He anyone experience a TypeError using the script action in a role’s tasks or in an include?

This tasks in a roles/x/tasks/main.yml:

  • name: create summary report

script: …/bin/create_summary -d{{ today }} -i{{ output_path }}/* -o{{ output_path }}/…/{{ today }}-summary.html

Throws an unhandled error when I run the playbook for hosts: 127.0.0.1

File “/efs/dist/bti/ansible/1.3.1/common/lib/ansible/utils/init.py”, line 259, in path_dwim_relative

if os.path.exists(source2):

File “/efs/dist/python/core/2.7/exec/lib/python2.7/genericpath.py”, line 18, in exists

os.stat(path)

TypeError: must be encoded string without NULL bytes, not str

Same result when I do a direct include of the roles/x/tasks/main.yml file. I also got a similar result using a command where I copied the script over.

If I pull all of the tasks in that file out and embed the tasks in my playbook all is fine. I tried 1.3.2 also. I can’t deploy what’s in HEAD unless I want mine cut off by the powers that be.

Thoughts?

I recall something recent reported about variables with the script module.

Likely could be the same. I seem to recall someone with a zero width unicode space but that might be me confusing issues together :slight_smile:

Can you file a github so we can try to reproduce?

We might need a minimal contained example.

Just to wrap this up…

I created a simple test example that exposes the error in 1.3.2. The example does not fail in the latest version of the code in devel/HEAD so I’m not going to file a ticket. I’ll just work around it here until I have an official 1.4 release to deploy.