Ansible playbook to check disk space is failing

Hi

You are declaring ansible_mounts as a list of strings. It literally is:
ansible_mounts: ['xyz', 'abc']. Ansible is complaining, that the string
'xyz' does not have a 'mount' property. You are obviously missing a step,
where you actually check the available space :slight_smile:

Piotr

Hi Piotr,

Thank you for your quick response. I am trying to check if the available disk space is greater than 30% and declared mounts as variables but still it is failing. COuld you please help.

Playbook.yml

Hi

vars_files:

  • /etc/ansible/xyz/pre-deploy/vars/main.yml
    you are overwriting the ansible_mounts fact - you loose the information on mounts. Remove the above as well.

Last one
when: item.mount == mountname