add option for excludes
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
262968f944
commit
7bd4c50f8e
2
defaults/main.yml
Normal file
2
defaults/main.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
update_packages_exclude: []
|
@ -1,7 +1,20 @@
|
|||||||
---
|
---
|
||||||
- name: Upgrade packages
|
- block:
|
||||||
apt:
|
- name: Add package lock
|
||||||
update_cache: yes
|
dpkg_selections:
|
||||||
upgrade: dist
|
name: python
|
||||||
|
selection: hold
|
||||||
|
loop: "{{ update_packages_exclude }}"
|
||||||
|
|
||||||
|
- name: Upgrade packages
|
||||||
|
apt:
|
||||||
|
update_cache: yes
|
||||||
|
upgrade: dist
|
||||||
|
|
||||||
|
- name: Remove package lock
|
||||||
|
dpkg_selections:
|
||||||
|
name: python
|
||||||
|
selection: install
|
||||||
|
loop: "{{ update_packages_exclude }}"
|
||||||
become: True
|
become: True
|
||||||
become_user: root
|
become_user: root
|
||||||
|
@ -3,5 +3,6 @@
|
|||||||
yum:
|
yum:
|
||||||
name: "*"
|
name: "*"
|
||||||
state: latest
|
state: latest
|
||||||
|
exclude: "{{ update_packages_exclude }}"
|
||||||
become: True
|
become: True
|
||||||
become_user: root
|
become_user: root
|
||||||
|
Loading…
Reference in New Issue
Block a user