yes you are right . delegate_to: 127.0.0.1 or delegate_to: localhost
On Tuesday, March 5, 2019 at 3:44:44 AM UTC+1, Ryan wrote:
> I have a playbook that uses the following:
> - set_fact: logfile=/home/sandbox/playbooks/LOGS/{{ systemSN }}
>
> Lower in the playbook I have:
>
> - lineinfile:
> line: "{{ item }}"
> path: "{{ logfile }}"
> create: yes
> with_items:
> - "Serial Number: {{ ansible_product_version }}"
>
>
> When I run the playbook on Server 1 which has Ansible 2.3.1.0 I get the
> file created on the local server I am running Ansible from. This is what I
> want. When I run this same playbook on a different server ("Server 2" on a
> different network) with Ansible 2.7.8, the file is created on the remote
> system, which I do not want. Why is the behavior not consistent, and how
> do I specify that I want the file to be created on the local server I am
> running Ansible from, not on the remote systems?
>
--
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/839f5b60-5221-4ccb-9d20-66109fc6a4ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.