optimisation

This commit is contained in:
vincent 2020-01-13 20:04:49 +01:00
parent 8c4c1a2650
commit 5c2b11d89d
2 changed files with 3 additions and 5 deletions

View File

@ -5,8 +5,7 @@
force: true # not required. When removing package - force remove package, without any checks. When update_cache - force redownload repo databases. force: true # not required. When removing package - force remove package, without any checks. When update_cache - force redownload repo databases.
update_cache: false update_cache: false
become: yes become: yes
when: system_upgrade when: system_upgrade and ansible_facts['os_family'] == "Archlinux"
register: upgrade
- name: upgrade system - name: upgrade system
pacman: pacman:
@ -15,13 +14,13 @@
force: true # not required. When removing package - force remove package, without any checks. When update_cache - force redownload repo databases. force: true # not required. When removing package - force remove package, without any checks. When update_cache - force redownload repo databases.
update_cache: false update_cache: false
become: yes become: yes
when: system_upgrade when: system_upgrade and ansible_facts['os_family'] == "Archlinux"
register: upgrade register: upgrade
- name: Reboot updates to apply - name: Reboot updates to apply
reboot: reboot:
reboot_timeout: 3600 reboot_timeout: 3600
when: upgrade.changed and "linux" in upgrade.packages and system_upgrade when: upgrade.changed and "linux" in upgrade.packages and system_upgrade and ansible_facts['os_family'] == "Archlinux"
become: yes become: yes
- name: launch arch base install software - name: launch arch base install software

View File

@ -7,5 +7,4 @@
when: ansible_facts['os_family'] == "Debian" when: ansible_facts['os_family'] == "Debian"
- include_tasks: AUR_builder.yml - include_tasks: AUR_builder.yml
when: ansible_facts['os_family'] == "Archlinux" when: ansible_facts['os_family'] == "Archlinux"
- include_tasks: base_software.yml - include_tasks: base_software.yml