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
2019-06-06 14:31:04 +02:00

83 lines
1.7 KiB
YAML

---
- include_tasks: versioncheck.yml
when: submodules_versioncheck|bool
- name: Install common base packages [Debian]
become: yes
apt:
package: "{{ base_packages }}"
state: present
update_cache: yes
cache_valid_time: 43200
when:
- ansible_distribution == 'Debian'
- name: Install common base packages [Debian]
become: yes
apt:
package: "{{ debian_packages }}"
state: present
update_cache: yes
cache_valid_time: 43200
when:
ansible_os_family == 'Debian'
- name: Install common base packages [all]
become: yes
package:
name: "{{ base_packages }}"
state: present
when:
ansible_distribution != 'Debian'
- name: Install common base packages [Fedora]
become: yes
package:
name: "{{ fedora_packages }}"
state: present
when:
ansible_distribution == 'Fedora'
- name: Install some common Debian specific packages
become: yes
apt:
package:
- debian-goodies
- apt-dater-host
- apt-transport-https
state: present
update_cache: yes
cache_valid_time: 43200
when: ansible_distribution == 'Debian'
- name: install packages for everyone except centos/rhel
become: true
package:
name: "{{ packages_for_all_except_rhel }}"
state: present
when: ansible_os_family != 'RedHat'
- name: Install extra packages
become: true
package:
name: "{{ packages_extra }}"
state: present
when:
- packages_extra is defined
- packages_extra != '[]'
- name: Remove rpcbind, nfs-common
become: yes
package:
name:
- rpcbind
- nfs-common
state: absent
- name: Upgrade all packages to latest
become: true
package:
name: "*"
state: latest
when:
- upgrade_packages_to_latest_version|bool