📦 NEW: Added PLaybooks
This commit is contained in:
21
update-apt-packages.pb.yml
Normal file
21
update-apt-packages.pb.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
|
||||
- hosts: ["main_server"]
|
||||
become: yes
|
||||
tasks:
|
||||
- name: Update Repository Index [apt update]
|
||||
tags: ["update-apt-packages"]
|
||||
package:
|
||||
update_cache: yes
|
||||
cache_valid_time: 3600
|
||||
register: apt_update
|
||||
when: ansible_distribution in ["Ubuntu", "Debian"] and ansible_distribution_version in ["20.04", "22.04"]
|
||||
|
||||
- name: Upgrade Dist[apt upgrade]
|
||||
tags: ["upgrade-apt-packages"]
|
||||
package:
|
||||
upgrade: dist
|
||||
force_apt_get: yes
|
||||
autoremove: yes
|
||||
autoclean: yes
|
||||
when: ansible_distribution in ["Ubuntu", "Debian"] and ansible_distribution_version in ["20.04", "22.04"]
|
||||
Reference in New Issue
Block a user