forked from HawksRepos/PTS-Team
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
MrDoobPG
authored and
MrDoobPG
committed
Sep 7, 2019
1 parent
f7c534b
commit 673e1a9
Showing
4 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
- hosts: all | ||
environment: | ||
LC_ALL: C | ||
LANG: C | ||
|
||
tasks: | ||
|
||
- name: Update APT package cache | ||
apt: update_cache=yes cache_valid_time=600 | ||
|
||
- name: Upgrade APT to the latest packages | ||
apt: upgrade=dist | ||
register: apt_result | ||
|
||
- name: Autoremove unused packages | ||
command: apt-get -y autoremove | ||
register: apt_result | ||
changed_when: "'packages will be REMOVED' in apt_result.stdout" | ||
|
||
- name: Purge residual kernel packages | ||
shell: apt-get remove -y --purge $(dpkg -l | grep "^rc\s*linux-image-" | awk '{print $2}' | tr '\n' ' ') | ||
register: apt_result | ||
changed_when: "'packages will be REMOVED' in apt_result.stdout" |