You can do the following (use two tasks instead of one 'template'):

1. Generate the template on the controller host (with delegate_to:
localhost and run_once: true)
2. Copy the generated template to all the other hosts

kind regards
Pshem


On Sat, 2 Dec 2017 at 17:53 tomr <[email protected]> wrote:

> My understanding is that ansible normally generates a file from a template
> once *per host*. Is it possible, when I know in advance that a file will
> be identical for all hosts in a group, to generate it only once?
>
> Thanks,
> tomr
>
> --
> 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/41cbe4a7-5c5c-4aec-aaaa-8bb702bef44a%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/41cbe4a7-5c5c-4aec-aaaa-8bb702bef44a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAEaZiRXvUM48YXORmuET9EkoTuVbXVnpe9PQ98p%2BPgH4PyJ4Gg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to