Last active
April 24, 2018 13:52
-
-
Save metabsd/8c61b6158cbc845b68735f2f527adfaf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
#- hosts: en_utilisation:installed:&linux_red_hat:!production | |
- hosts: en_utilisation:installed:&sldadm* | |
- name: test for available disk space | |
assert: | |
that: | |
- not {{ item.mount == '/usr' and ( item.size_total <= 5368709120 ) }} | |
- not {{ item.mount == '/var' and ( item.size_total <= 5368709120 ) }} | |
msg: "{{ item.mount }} must be more than 5G" | |
with_items: "{{ ansible_mounts }}" | |
ignore_errors: yes | |
register: disk_free | |
tags: | |
- debug_freespace | |
- name: increase lv | |
lvol: | |
vg: rootvg | |
lv: lv03 | |
size: 5g | |
lvol: | |
vg: rootvg | |
lv: lv02 | |
size: 5g | |
when: disk_free|failed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment