Sistemata sintassi condizionale.

This commit is contained in:
Emiliano Vavassori 2020-04-29 23:54:11 +02:00
parent 1d47107d5e
commit dff054f238
13 changed files with 75 additions and 39 deletions

View File

@ -1,3 +1,5 @@
---
# Calibre
- apt: name=calibre state=present
- apt:
name: calibre
state: present
when: hwpoints|int >= 2

View File

@ -1,11 +1,14 @@
---
- set_fact: hwpoints=1
when: "{{ ansible_memtotal_mb | int }}" <= 2048 and "{{ ansible_processor_vcpus | int }}" <= 2
- set_fact:
hwpoints: 1
when: ansible_memtotal_mb|int <= 2048 and ansible_processor_vcpus|int <= 2
- set_fact: hwpoints=2
when: "{{ ansible_memtotal_mb | int }}" <= 4096 and "{{ ansible_processor_vcpus | int }}"<= 2
- set_fact:
hwpoints: 2
when: ansible_memtotal_mb|int <= 4096 and ansible_processor_vcpus|int <= 2
- set_fact: hwpoints=3
when: "{{ ansible_memtotal_mb | int }}" > 4096 and "{{ ansible_processor_vcpus | int }}" >= 4
- set_fact:
hwpoints: 3
when: ansible_memtotal_mb|int > 4096 and ansible_processor_vcpus|int >= 4
- setup:
- setup: filter=ansible_local

View File

@ -1,2 +1,5 @@
---
- apt: name=chromium-browser state=present
- apt:
name: chromium-browser
state: present
when: hwpoints|int >= 2

View File

@ -4,3 +4,4 @@
- geogebra
- geogebra-gnome
state: present
when: hwpoints|int >= 2

View File

@ -4,3 +4,4 @@
- gimp
- gimp-help-it
state: present
when: hwpoints|int >= 2

View File

@ -1,6 +1,10 @@
---
- get_url:
url: "https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb"
dest: /tmp/google-chrome-stable_current_amd64.deb
- block:
- get_url:
url: "https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb"
dest: /tmp/google-chrome-stable_current_amd64.deb
- shell: dpkg -i /tmp/google-chrome-stable_current_amd64.deb
- shell: dpkg -i /tmp/google-chrome-stable_current_amd64.deb
when: hwpoints|int >= 2

View File

@ -1,2 +1,5 @@
---
- apt: name=inkscape state=present
- apt:
name: inkscape
state: present
when: hwpoints|int >= 2

View File

@ -1,17 +1,17 @@
dependencies:
- checkhw
- neofetch
- { role: googlechrome, when: "{{ hwpoints | int }}" >= 2 }
- { role: chromium, when: "{{ hwpoints | int }}" >= 2 }
- googlechrome
- chromium
- firefox
- libreoffice
- { 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 }
- scribus
- calibre
- gimp
- inkscape
- openshot
- vlc
- { role: geogebra, when: "{{ hwpoints | int }}" >= 2 }
- { role: minetest, when: "{{ hwpoints | int }}" >= 2 }
- { role: zoom, when: "{{ hwpoints | int }}" > 2 }
- { role: msteams, when: "{{ hwpoints | int }}" > 2 }
- geogebra
- minetest
- zoom
- msteams

View File

@ -1,2 +1,3 @@
---
- apt: name=minetest state=present
when: hwpoints|int >= 2

View File

@ -1,7 +1,11 @@
---
- get_url:
url: 'https://go.microsoft.com/fwlink/p/?linkid=2112886&clcid=0x410&culture=it-it&country=it'
dest: /tmp/teams_amd64.deb
- block:
- shell: 'dpkg -i /tmp/teams_amd64.deb'
- get_url:
url: 'https://go.microsoft.com/fwlink/p/?linkid=2112886&clcid=0x410&culture=it-it&country=it'
dest: /tmp/teams_amd64.deb
- shell: 'dpkg -i /tmp/teams_amd64.deb'
when: hwpoints|int > 2

View File

@ -1,2 +1,5 @@
---
- apt: name=openshot state=present
- apt:
name: openshot
state: present
when: hwpoints|int >= 2

View File

@ -1,2 +1,5 @@
---
- apt: name=scribus state=present
- apt:
name: scribus
state: present
when: hwpoints|int >= 2

View File

@ -1,11 +1,19 @@
---
- apt: name=libxcb-xtest0 state=present
- block:
- get_url:
url: "https://zoom.us/client/latest/zoom_amd64.deb"
dest: /tmp/zoom_amd64.deb
- apt:
name: libxcb-xtest0
state: present
- get_url:
url: "https://zoom.us/client/latest/zoom_amd64.deb"
dest: /tmp/zoom_amd64.deb
- apt_key:
keyserver: keyserver.ubuntu.com
id: 396060CADD8A75220BFCB369B903BF1861A7C71D
- shell: dpkg -i /tmp/zoom_amd64.deb
- apt_key: keyserver=keyserver.ubuntu.com id=396060CADD8A75220BFCB369B903BF1861A7C71D
- shell: dpkg -i /tmp/zoom_amd64.deb
when: hwpoints|int > 2