Remove private key file reference from ansible.cfg; update hosts file with absolute path for private key; add playbooks for installing tools and updating OS

This commit is contained in:
martin.cholewa
2025-07-08 18:29:11 +02:00
parent 43827881fb
commit 1858e2c36f
4 changed files with 41 additions and 2 deletions

22
ansible/update_os.yml Normal file
View File

@@ -0,0 +1,22 @@
---
- name: Update all packages on Ubuntu (interactive)
hosts: all
become: yes
tasks:
- name: Update apt cache
ansible.builtin.apt:
update_cache: yes
register: apt_update_result
- name: Show apt update output
ansible.builtin.debug:
var: apt_update_result.stdout_lines
- name: Upgrade all packages to the latest version
ansible.builtin.apt:
upgrade: dist
register: apt_upgrade_result
- name: Show apt upgrade output
ansible.builtin.debug:
var: apt_upgrade_result.stdout_lines