0
- name: Verification de l'espace disponible dans le VG shell: /sbin/vgs --unit g --noheadings "{{ vg_name }}"| awk '{print $7}' | sed -e "s/^<//" | sed 's/g//' register: vg_space_available - name: Check de la taille disque necessaire shell: /bin/echo "({{size_FS_syst01}}+{{size_FS_syst02}}+{{size_FS_syst03}}+{{size_FS_data01}}+{{size_FS_arch}})" | bc register: check_size_disk - name: Espace disque insuffisant dans le VG fail: msg: "{{ ansible_hostname }} est un serveur physique. Pas de possibilite de rajouter un disque a chaud" when: vg_space_available.stdout|int < check_size_disk.stdout |int - name: Espace disque suffisant dans le VG debug: msg: "Taille disponible suffisante dans le VG. Lancement de la creation du FS" when: vg_space_available.stdout|int > check_size_disk.stdout|int 

The condition > < works perfectly for engine but not for tower...

Someone has an idea ? Thanks

0

1 Answer 1

0

I found the issue. The command vgs gives a number with "," instead of ".". I corrected this by using sed.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.