my first playbooks!
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
$ ansible-playbook --limit iris.heath.hpetersenfamily.com --list-hosts scraps/update_software.yml
|
||||
$ ansible-playbook --limit iris.heath.hpetersenfamily.com --syntax-check scraps/update_software.yml
|
||||
$ ansible-inventory --list
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
---
|
||||
|
||||
# CHANGEME - handle multiple software packaging systems (apt, yum, dnf, rpm, etc.)
|
||||
|
||||
- name: Update software
|
||||
hosts: all
|
||||
become: yes
|
||||
|
||||
post_tasks:
|
||||
|
||||
- name: Remove packages installed as dependencies that are no longer required and purge their configuration files
|
||||
ansible.builtin.apt:
|
||||
autoremove: yes
|
||||
purge: true
|
||||
|
||||
- name: Remove old downloaded packages
|
||||
ansible.builtin.apt:
|
||||
clean: yes
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
---
|
||||
|
||||
# CHANGEME - handle multiple software packaging systems (apt, yum, dnf, rpm, etc.)
|
||||
|
||||
- name: Update software
|
||||
hosts: all
|
||||
become: yes
|
||||
|
||||
pre_tasks:
|
||||
|
||||
- name: Update package repositories
|
||||
ansible.builtin.apt:
|
||||
update_cache: yes
|
||||
|
||||
- name: Upgrade all packages
|
||||
ansible.builtin.apt:
|
||||
upgrade: full
|
||||
Reference in New Issue
Block a user