Hi uppara

On Linux system we have a parameter -1 to list only names of files.

Walber

On Tue, 17 Sep 2019 at 10:12 AM Uppara venkat <[email protected]>
wrote:

> Hi,
>
> wanted to list the files in a directory and copy the only file name into
> property file,
>  using by win_shell:
>
>   - name:list the files
>       win_shell: 'ls {{directory}} > {{directory}}/manifest.prob'
>       register: dir_out
>
>     - debug: var={{item}}
>       with_items: dir_out.stdout_lines
>
>
>
> out put as
>
>
> Mode                LastWriteTime         Length Name
>
> ----                -------------         ------ ----
>
> -a----         9/9/2019   9:05 AM           7289 Database_0.0.100.zip
>
> -a----         9/9/2019   9:03 AM          18447
> EMC_ECS-package_0.0.100.zip
> -a----        9/17/2019   1:02 PM              0 file.txt
>
> -a----         9/9/2019   9:05 AM           7434 hotfix-DDMInfra.zip
>
> -a----         9/9/2019   9:03 AM          15631 hotfix-IIS.zip
>
> -a----         9/9/2019   9:05 AM          16808
> hotfix-QCIM1H126382-v3.zip
>    I don't want other information, How list only file names?
>
>
>
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAFMhZ_L7_yD7193kScoaJzDGJh6v0rxGOcg8-aO_FsZFOgN8Vw%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CAFMhZ_L7_yD7193kScoaJzDGJh6v0rxGOcg8-aO_FsZFOgN8Vw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
-- 


*Walber Santos da Silva*
*Cel 19 98822-3269*
*ID* *130-123-839*

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAKo4rnF_RDJiQoK5sPxFQpVibEzxvyt2eHfg2EKpu2BJnD6gnA%40mail.gmail.com.

Reply via email to