win_template always changing?

108 views
Skip to first unread message

Chris Bennett

unread,
Feb 29, 2016, 6:39:43 AM2/29/16
to ansible...@googlegroups.com
Hi there,

I've just starting hitting some Windows hosts with Ansible & winrm and
when I use the win_template module, it changes every run:

conf:
======================================================================
- name: Install nxlog.conf template
win_template:
src=templates/nxlog/nxlog.conf.tmpl
dest="c:\\Program Files (x86)\\nxlog\\conf\\nxlog.conf"
tags:
- conf
notify:
- restart nxlog

First run:
======================================================================
$ date; time ansible-playbook -i inv -l svrexch13-01.victor.sa.gov.au win-syslog.yml --tags conf
Mon Feb 29 22:06:54 ACDT 2016

PLAY [win] *********************************************************************

TASK [Install nxlog.conf template] *********************************************
changed: [svrexch13-01.victor.sa.gov.au]

PLAY RECAP *********************************************************************
svrexch13-01.victor.sa.gov.au : ok=1 changed=1 unreachable=0 failed=0


real 0m16.140s
user 0m1.207s
sys 0m0.203s

(confirmed config is correct on remote host)


Second run:
======================================================================
$ date; time ansible-playbook -i inv -l svrexch13-01.victor.sa.gov.au win-syslog.yml --tags conf
Mon Feb 29 22:07:19 ACDT 2016

PLAY [win] *********************************************************************

TASK [Install nxlog.conf template] *********************************************
changed: [svrexch13-01.victor.sa.gov.au]

PLAY RECAP *********************************************************************
svrexch13-01.victor.sa.gov.au : ok=1 changed=1 unreachable=0 failed=0


real 0m16.150s
user 0m1.206s
sys 0m0.192s


Has anyone else observed the same thing?

Thanks,

Chris

J Hawkesworth

unread,
Feb 29, 2016, 12:05:28 PM2/29/16
to Ansible Project
Hi I have noticed this behaviour when running the windows integration tests.  As far as I can tell it is something that has started happening relatively recently.
What version of ansible are you using?

Many thanks,

Jon

Brian Coca

unread,
Mar 1, 2016, 12:28:37 AM3/1/16
to ansible...@googlegroups.com
the way checksums are calculated on the unix side had changes and they seem to have affected the windows side also, mdavis recently made an update to compensate for that, please check against current devel to see if the problem persists.

--
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-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/ac827bf5-e50f-4947-b0e2-0e88f8c80863%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
----------
Brian Coca

Chris Bennett

unread,
Mar 1, 2016, 5:25:12 AM3/1/16
to ansible...@googlegroups.com
Hi Jon/Brian,

I'm running devel. Performed a pull & retried but still seeing a
change in the file.

Regards,

Chris

J Hawkesworth

unread,
Mar 1, 2016, 6:34:55 AM3/1/16
to Ansible Project
Chris,
Thanks for testing.
Did you also update to latest devel of the submodule project?
Jon

Chris Bennett

unread,
Mar 1, 2016, 4:56:49 PM3/1/16
to 'J Hawkesworth' via Ansible Project
Hi Jon,

No, sadly I didn't! :( For some reason I thought a post-pull hook had
been implemented that made that unnecessary. Apologies for the noise,
it is working as expected now :)

Regards,

Chris

J Hawkesworth

unread,
Mar 2, 2016, 1:40:34 AM3/2/16
to Ansible Project
Chris, glad you are working again.  I just tested and the template integration tests are passing again now with latest devel.

For info I think there is still an issue regarding leaving temp dirs behind when using win_template which I am investigating under https://github.com/ansible/ansible-modules-core/issues/3032

Jon
Reply all
Reply to author
Forward
0 new messages