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
|
||||
apt:
|
||||
update_cache: yes
|
||||
upgrade: dist
|
||||
- block:
|
||||
- name: Add package lock
|
||||
dpkg_selections:
|
||||
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_user: root
|
||||
|
@ -3,5 +3,6 @@
|
||||
yum:
|
||||
name: "*"
|
||||
state: latest
|
||||
exclude: "{{ update_packages_exclude }}"
|
||||
become: True
|
||||
become_user: root
|
||||
|
Loading…
Reference in New Issue
Block a user