Hi Roger,

I don't know how much programming experience you have, but you can think of 
the role as a subroutine. With the syntax you've got, you're calling this 
role/subroutine twice, therefore it's going to do each task in the role 
twice. However, you only want it to do one thing on each call, which is to 
create a file in the directory specified with the 'dir' parameter, having 
the contents of the port you've specified.

Can I suggest that you try writing the role to have one task as I posted it 
and see if it does what you want.

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/4ea96edc-7788-455d-8b74-60c74c6e0c5b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to