Changed to check the file exists
- name: Make sure file exists
file:
path: /root/*-needsreboot.log
state: touch
still need an example for fetch and loop if that is needed or variable and
loop.
On Friday, November 3, 2017 at 7:40:28 AM UTC-5, Kent Younge wrote:
>
> I'm pretty
I'm pretty new to Ansible and I am doing something wrong when I try it with
variables. All I get is errors now. and I have not even gotten to the
loop part yet.
- name: "check if files exsists"
shell: /path/*-needsreboot.log
register: log_result
ignore_errors: True
shell:/path/
this explains it.
http://docs.ansible.com/ansible/latest/playbooks_variables.html#registered-variables
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails
So how would it look?
> On Nov 2, 2017, at 6:15 PM, Brian Coca wrote:
>
> fetch does not support wildcards, register the data from find and use
> that in loop in fetch
>
> --
> --
> Brian Coca
>
> --
> You received this message because you are subscribed to a
fetch does not support wildcards, register the data from find and use
that in loop in fetch
--
--
Brian Coca
--
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
Hello,
I have created a log file using ansible an have named the log file with the
host name. I need to fetch that file from all my hosts and put it in a
directory on the control server. However, it runs fine but does not copy
the files over. Here is my cmds.
- name: "Find