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:
22
ansible/update_os.yml
Normal file
22
ansible/update_os.yml
Normal 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
|
Reference in New Issue
Block a user