Ebrahim For non-develoment topics you should use https://groups.google.com/g/ansible-project group/mailinglist
On Mon, Jun 5, 2023 at 10:54 PM Ebrahim Kutty <ebrahimkal...@gmail.com> wrote: > Hi, > > I want to configure to check the file system free space available > everyday and send mail if it is more than 80% . I tried with the below YAML > code, but didn't work. > > --- > - name: Check Filesystem Usage > hosts: 10.190.0.36 > gather_facts: true > tasks: > - name: Get Filesystem Facts > shell: "df -h /|grep -v Filesystem|awk '{print $4}'|cut -d G -f1" > register: df_out > - debug: > var: df_out.stdout_lines[1] | !int > > - name: Send Email Notification > command: echo "Filesystem Usage is above the threshold." | mail > -s "Filesystem Alert" ebrahimkal...@gmail.com > when: df_out.stdout_lines[1] | int > 30 # Specify the > threshold percentage here > ... > > > Regards, > Ebrahim > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Development" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to ansible-devel+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-devel/1e465854-868f-42e2-8be2-3758b29cef47n%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-devel/1e465854-868f-42e2-8be2-3758b29cef47n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- - Andrew "lathama" Latham - -- You received this message because you are subscribed to the Google Groups "Ansible Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-devel/CA%2Bqj4S9OYnOxcZb0Xjm_wzuRypq3ouHEZEbPM8bXxPA3c__1eQ%40mail.gmail.com.