diff --git a/roles/checkhw/tasks/main.yml b/roles/checkhw/tasks/main.yml index a67e791..bcb6d5d 100644 --- a/roles/checkhw/tasks/main.yml +++ b/roles/checkhw/tasks/main.yml @@ -1,11 +1,11 @@ --- - set_fact: hwpoints=1 - when: ansible_memtotal_mb <= 2048 and ansible_processor_vcpus <= 2 + when: {{ ansible_memtotal_mb | int }} <= 2048 and {{ ansible_processor_vcpus | int }} <= 2 - set_fact: hwpoints=2 - when: ansible_memtotal_mb <= 4096 and ansible_processor_vcpus <= 2 + when: {{ ansible_memtotal_mb | int }} <= 4096 and {{ ansible_processor_vcpus | int }}<= 2 - set_fact: hwpoints=3 - when: ansible_memtotal_mb > 4096 and ansible_processor_vcpus >= 4 + when: {{ ansible_memtotal_mb | int }} > 4096 and {{ ansible_processor_vcpus | int }} >= 4 - setup: diff --git a/roles/install/meta/main.yml b/roles/install/meta/main.yml index d1d3542..6eb354f 100644 --- a/roles/install/meta/main.yml +++ b/roles/install/meta/main.yml @@ -1,17 +1,17 @@ dependencies: - checkhw - neofetch - - { role: googlechrome, when: hwpoints >= 2 } - - { role: chromium, when: hwpoints >= 2 } + - { role: googlechrome, when: {{ hwpoints | int }} >= 2 } + - { role: chromium, when: {{ hwpoints | int }} >= 2 } - firefox - libreoffice - - { role: scribus, when: hwpoints >= 2 } - - { role: calibre, when: hwpoints >= 2 } - - { role: gimp, when: hwpoints >= 2 } - - { role: inkscape, when: hwpoints >= 2 } - - { role: openshot, when: hwpoints >= 3 } + - { role: scribus, when: {{ hwpoints |int }} >= 2 } + - { role: calibre, when: {{ hwpoints | int }} >= 2 } + - { role: gimp, when: {{ hwpoints | int }} >= 2 } + - { role: inkscape, when: {{ hwpoints | int }} >= 2 } + - { role: openshot, when: {{ hwpoints | int }} >= 3 } - vlc - - { role: geogebra, when: hwpoints >= 2 } - - { role: minetest, when: hwpoints >= 2 } - - { role: zoom, when: hwpoints > 2 } - - { role: msteams, when: hwpoints > 2 } + - { role: geogebra, when: {{ hwpoints | int }} >= 2 } + - { role: minetest, when: {{ hwpoints | int }} >= 2 } + - { role: zoom, when: {{ hwpoints | int }} > 2 } + - { role: msteams, when: {{ hwpoints | int }} > 2 }