Skip to content

Instantly share code, notes, and snippets.

@tcpdump-examples
Created April 15, 2023 08:28
Show Gist options
  • Save tcpdump-examples/6776c0c12c2ba26b918e027a42fabcb9 to your computer and use it in GitHub Desktop.
Save tcpdump-examples/6776c0c12c2ba26b918e027a42fabcb9 to your computer and use it in GitHub Desktop.

Revisions

  1. tcpdump-examples created this gist Apr 15, 2023.
    12 changes: 12 additions & 0 deletions get-file-size-ansible.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    #https://www.howtouselinux.com/post/how-to-get-file-size-with-ansible
    - name: Get file size
    hosts: your_host
    tasks:
    - name: Check file size
    stat:
    path: /path/to/your/file
    register: file_info

    - name: Display file size
    debug:
    var: file_info.stat.size