HI Dick,

Thanks for your help. It works!!!!.

Regards

On Thu, Jun 13, 2019 at 8:33 PM Dick Visser <[email protected]> wrote:
>
> Try:
>
> --
>  - hosts: 10.33.81.12
>    vars:
>     dir_src: "C:/Websites/citihabitats.com/"
>     dir_dest: /tmp/fetched/
>    tasks:
>    - name: fetch nginx access and error log
>      fetch:
>        src:  "{{ dir_src }}/{{ item}}.config"
>        dest: "{{ dir_dest }}/{{ inventory_hostname }}/"
>        flat: yes
>     register: fetch_output
>      loop:
>        - appsettings.beta
>        - Web
>
>
>
> On Thu, 13 Jun 2019 at 23:10, federico montaldo <[email protected]> wrote:
> >
> > HI folks:
> >
> > I need to extract two files for a windows servers. I made the following 
> > playbook:
> >
> > ---
> >  - hosts: 10.33.81.12
> >    vars:
> >     dir_src: "C:/Websites/citihabitats.com/"
> >     dir_dest: /tmp/fetched/
> >    tasks:
> >    - name: fetch nginx access and error log
> >      fetch:
> >        src:  "{{ dir_src }}/{{ item}}.config"
> >        dest: "{{ dir_dest }}"
> >      register: fetch_output
> >      loop:
> >        - appsettings.beta
> >        - Web
> >
> > It works but I want to know if there is a way to exclude the full path of 
> > the windows dir. This is the output there I got ins the dir for the ansible 
> > controller.
> >
> >
> > [svc-devops@wnrt2-cg-lmon2 ansible]$ tree /tmp/fetched/10.33.81.12/
> > /tmp/fetched/10.33.81.12/
> > └── C:
> >     └── Websites
> >         └── citihabitats.com
> >             ├── appsettings.beta.config
> >             └── Web.config
> >
> > 3 directories, 2 files
> >
> > There is a way to only have a destination dir like:
> >
> > /tmp/fetched/IP/
> >
> > Thanks in advance
> >
> > Regards
> >
> > --
> > 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/e017138f-7f90-4d3d-ae53-3a4e202478e0%40googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> Dick Visser
> Trust & Identity Service Operations Manager
> GÉANT
>
> --
> 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/CAL8fbwNvfFn-S9g_ReL0PqpMeyfG%2BC6EgWWF6VZrNwjqq%2B_trw%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/CALDU2rzaEu-ujDt3V%3DSCd7udpmF%2BKifpJcnszrpiH_EM1V8kjw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to