2018-11-12 20:45:12 +01:00
---
2019-07-16 16:53:03 +02:00
- include_tasks : os_info.yml
when : print_os_vars | bool
2019-05-22 10:57:06 +02:00
- include_tasks : versioncheck.yml
2019-07-15 23:07:17 +02:00
when : submodules_versioncheck | bool
2019-07-15 23:09:48 +02:00
- include_tasks : sources.yml
2019-07-15 23:47:30 +02:00
when : ansible_distribution == 'Debian'
2018-11-14 11:46:29 +01:00
- name : Install common base packages [Debian]
2019-03-08 15:16:42 +01:00
become : yes
2018-11-14 11:46:29 +01:00
apt :
package : "{{ debian_packages }}"
2019-04-30 09:41:57 +02:00
state : present
2018-11-12 20:45:12 +01:00
update_cache : yes
2018-11-12 21:01:35 +01:00
cache_valid_time : 43200
2019-11-12 17:31:27 +01:00
when : ansible_os_family == 'Debian' and ansible_distribution_version != '7' and ansible_distribution_release != 'wheezy' and ansible_machine != 'armv6l'
2018-11-14 11:46:29 +01:00
2019-11-28 16:39:18 +01:00
- name : Install common base packages [all - wheezy]
become : yes
package :
name : "{{ base_packages_extended }}"
state : present
when :
- ansible_machine != 'armv6l'
- ansible_distribution_release != 'wheezy'
- ansible_architecture != 'armv7l'
- name : Install extended base packages [all - wheezy - rpi]
2019-03-08 15:16:42 +01:00
become : yes
2018-11-14 11:46:29 +01:00
package :
name : "{{ base_packages }}"
2019-04-30 09:41:57 +02:00
state : present
2019-07-17 22:59:12 +02:00
when : ansible_machine != 'armv6l' and ansible_distribution_release != 'wheezy'
2018-11-14 11:46:29 +01:00
2019-11-28 16:39:18 +01:00
2018-11-14 11:46:29 +01:00
- name : Install common base packages [Fedora]
2019-03-08 15:16:42 +01:00
become : yes
2018-11-14 11:46:29 +01:00
package :
name : "{{ fedora_packages }}"
2019-04-30 09:41:57 +02:00
state : present
2019-07-17 14:02:01 +02:00
when : ansible_distribution == 'Fedora'
2018-11-12 20:45:12 +01:00
2019-06-06 14:29:53 +02:00
- name : install packages for everyone except centos/rhel
become : true
package :
name : "{{ packages_for_all_except_rhel }}"
state : present
2019-07-16 13:41:32 +02:00
when :
- ansible_os_family != 'RedHat'
- ansible_distribution_version != "14.04"
- ansible_distribution_version != "12.04"
2019-07-17 14:02:01 +02:00
- ansible_distribution_release != 'wheezy'
2019-07-17 22:59:12 +02:00
- ansible_machine != 'armv6l' and ansible_distribution_release != 'wheezy'
2019-06-06 14:29:53 +02:00
2019-05-14 17:37:22 +02:00
- name : Install extra packages
become : true
package :
name : "{{ packages_extra }}"
state : present
when :
- packages_extra is defined
- packages_extra != '[]'
2019-07-17 22:59:12 +02:00
- ansible_machine != 'armv6l' and ansible_distribution_release != 'wheezy'
2019-05-14 17:37:22 +02:00
2018-11-12 21:01:35 +01:00
- name : Remove rpcbind, nfs-common
2019-03-08 15:16:42 +01:00
become : yes
2018-11-14 11:46:29 +01:00
package :
name :
2018-11-12 21:01:35 +01:00
- rpcbind
- nfs-common
state : absent
2019-11-14 16:06:41 +01:00
when :
- ansible_machine != 'armv6l' and ansible_distribution_release != 'wheezy'
2019-11-15 13:38:35 +01:00
- ansible_os_family == 'Debian'
2018-11-12 21:01:35 +01:00
2019-04-30 09:41:57 +02:00
- name : Upgrade all packages to latest
become : true
package :
name : "*"
state : latest
when :
2019-05-20 15:41:50 +02:00
- upgrade_packages_to_latest_version|bool
2019-07-17 22:59:12 +02:00
- ansible_machine != 'armv6l' and ansible_distribution_release != 'wheezy'
2019-07-16 16:26:04 +02:00
- include_tasks : editor.yml
when : editor_is_vim | bool