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/e7593b9f-6f50-4fa8-b80f-589ad84c7f6e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.