Thanks Matt!!   That is the answer I was looking for.

--John

On Wed, Nov 10, 2021 at 9:42 AM Matt Martz <[email protected]> wrote:

> The template is always generated locally where ansible is executed from.
> Then we call the `copy` action internally, which will call the `stat`
> module to get the checksum of the remote file and determine if it exists.
> If the local checksum and remote checksum matches, the file is not copied
> to the remote.  Afterwards we call the `file` action/module, and
> potentially modify permissions/ownership/mode on the destination file.
>
> On Wed, Nov 10, 2021 at 8:36 AM John Petro <[email protected]> wrote:
>
>> Good morning!!
>>
>> I have a quick question about how the template module works under the
>> hood, that I wasn't able to find any information on, and was asked about by
>> a coworker.
>>
>> So, let's say I have a role where I created a config file from a
>> template.  If I run that role a second time, the result comes back having
>> not making any changes, which is what I expect.   So the question I have is
>> when I run a playbook against that role multiple times, how does ansible
>> check the value to determine if a change needs to be made or not.
>>
>> --john
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/CAPAjob_ikZ60_ijHj9hA%3DLoGVc-7Yy-tzh1m8Dfkm1YHSSX_yQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/ansible-project/CAPAjob_ikZ60_ijHj9hA%3DLoGVc-7Yy-tzh1m8Dfkm1YHSSX_yQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> --
> Matt Martz
> @sivel
> sivel.net
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAD8N0v-Prdkn9POzfw3prtZ5AcrBN4-fpd4zF1p8n%2BLC-ugS-A%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CAD8N0v-Prdkn9POzfw3prtZ5AcrBN4-fpd4zF1p8n%2BLC-ugS-A%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAPAjob_Kr8uE7SAXV1x3OTAEtS9YqFD%3D3U9KVWAWZkVLLcyzLg%40mail.gmail.com.

Reply via email to