1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_packages.git synced 2024-08-16 10:19:51 +02:00
ansible_role_packages/tasks/main.yml

84 lines
1.7 KiB
YAML
Raw Normal View History

2018-11-12 20:45:12 +01:00
---
2019-05-22 10:57:06 +02:00
- include_tasks: versioncheck.yml
2019-05-20 15:41:50 +02:00
when: submodules_versioncheck|bool
- name: Install common base packages [Debian]
2019-03-08 15:02:20 +01:00
become: yes
2018-11-12 20:45:12 +01:00
apt:
package: "{{ base_packages }}"
2019-04-30 09:41:57 +02:00
state: present
update_cache: yes
cache_valid_time: 43200
when:
2019-03-08 15:02:20 +01:00
- ansible_distribution == 'Debian'
- name: Install common base packages [Debian]
2019-03-08 15:16:42 +01:00
become: yes
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
when:
2019-04-30 14:45:55 +02:00
ansible_os_family == 'Debian'
2019-04-29 16:21:30 +02:00
- name: Install common base packages [all]
2019-03-08 15:16:42 +01:00
become: yes
package:
name: "{{ base_packages }}"
2019-04-30 09:41:57 +02:00
state: present
when:
ansible_distribution != 'Debian'
- name: Install common base packages [Fedora]
2019-03-08 15:16:42 +01:00
become: yes
package:
name: "{{ fedora_packages }}"
2019-04-30 09:41:57 +02:00
state: present
when:
2019-04-29 16:21:30 +02:00
ansible_distribution == 'Fedora'
2018-11-12 20:45:12 +01:00
- name: Install some common Debian specific packages
2019-03-08 15:16:42 +01:00
become: yes
2018-11-12 20:45:12 +01:00
apt:
2018-11-12 21:01:35 +01:00
package:
- debian-goodies
- apt-dater-host
2019-03-08 15:02:20 +01:00
- apt-transport-https
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
2018-11-12 20:45:12 +01:00
when: ansible_distribution == 'Debian'
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
when: ansible_os_family != 'RedHat'
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 != '[]'
2018-11-12 21:01:35 +01:00
- name: Remove rpcbind, nfs-common
2019-03-08 15:16:42 +01:00
become: yes
package:
name:
2018-11-12 21:01:35 +01:00
- rpcbind
- nfs-common
state: absent
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