If you run with -vvvvv what error message do you see?
Does your ansible user have permission to write to
c:\temp\ansible-windows.log ?
Hope this helps,
Jon
On Thursday, February 16, 2017 at 6:52:24 PM UTC, cupcake wrote:
>
> ansible core 2.1
>
> When using win_lineinfile module and the `create: yes` option it seems it
> should create a new file. it fails the same as if create:yes is not
> specified.
>
> - hosts: all
> tasks:
>
> - name: win_lineinfile test
> win_lineinfile:
> dest: 'c:\temp\ansible-windows.log'
> create: yes
> line: '{{ ansible_hostname }}-{{ ansible_date_time.iso8601 }}'
> regexp: '{{ ansible_hostname }}-'
> state: present
>
> If dest doesn't exist it fails. Guessing I am doing something wrong?
>
>
>
>
--
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/4c16a3ef-6ae3-4866-9290-47e1d2e62cb7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.