mirror of
https://github.com/roles-ansible/ansible_role_packages.git
synced 2024-08-16 10:19:51 +02:00
Optionally upgrade all packages
This commit is contained in:
parent
ae55b6f7f9
commit
582702c29a
2 changed files with 20 additions and 6 deletions
|
@ -34,3 +34,4 @@ fedora_packages:
|
|||
- mtr
|
||||
- libselinux-python
|
||||
|
||||
upgrade_packages_to_latest_version: false
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
become: yes
|
||||
apt:
|
||||
package: "{{ base_packages }}"
|
||||
state: latest
|
||||
state: present
|
||||
update_cache: yes
|
||||
cache_valid_time: 43200
|
||||
when:
|
||||
|
@ -14,7 +14,7 @@
|
|||
become: yes
|
||||
apt:
|
||||
package: "{{ debian_packages }}"
|
||||
state: latest
|
||||
state: present
|
||||
update_cache: yes
|
||||
cache_valid_time: 43200
|
||||
when:
|
||||
|
@ -24,7 +24,7 @@
|
|||
become: yes
|
||||
package:
|
||||
name: "{{ base_packages }}"
|
||||
state: latest
|
||||
state: present
|
||||
when:
|
||||
ansible_distribution != 'Debian'
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
|||
become: yes
|
||||
package:
|
||||
name: "{{ fedora_packages }}"
|
||||
state: latest
|
||||
state: present
|
||||
when:
|
||||
ansible_distribution == 'Fedora'
|
||||
|
||||
|
@ -43,12 +43,11 @@
|
|||
- debian-goodies
|
||||
- apt-dater-host
|
||||
- apt-transport-https
|
||||
state: latest
|
||||
state: present
|
||||
update_cache: yes
|
||||
cache_valid_time: 43200
|
||||
when: ansible_distribution == 'Debian'
|
||||
|
||||
|
||||
- name: Remove rpcbind, nfs-common
|
||||
become: yes
|
||||
package:
|
||||
|
@ -57,4 +56,18 @@
|
|||
- nfs-common
|
||||
state: absent
|
||||
|
||||
- name: APTITUDE is required
|
||||
become: yes
|
||||
package:
|
||||
name:
|
||||
- aptitude
|
||||
state: present
|
||||
when: ansible_os_family == 'Debian'
|
||||
|
||||
- name: Upgrade all packages to latest
|
||||
become: true
|
||||
package:
|
||||
name: "*"
|
||||
state: latest
|
||||
when:
|
||||
- upgrade_packages_to_latest_version
|
||||
|
|
Loading…
Reference in a new issue