Re: [ansible-project] use fetch module with wild card or best way to grab different name file from several hosts

2017-11-03 Thread Kent Younge
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

Re: [ansible-project] use fetch module with wild card or best way to grab different name file from several hosts

2017-11-03 Thread Kent Younge
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/

Re: [ansible-project] use fetch module with wild card or best way to grab different name file from several hosts

2017-11-02 Thread Kent Younge
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

[ansible-project] use fetch module with wild card or best way to grab different name file from several hosts

2017-11-02 Thread Kent Younge
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