You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
homelab/update.yml

35 lines
682 B

9 months ago
- hosts: all
sudo: yes
9 months ago
tasks:
9 months ago
- name: update apt list
apt:
update_cache: yes
9 months ago
- name: Update and upgrade apt packages
apt:
upgrade: yes
# - hosts: all
# become: true
# become_method: sudo
# become_user: root
# tasks:
# - name: get user
# # uses_shell: true
# ansible.builtin.shell: whoami
9 months ago
9 months ago
9 months ago
# - name: Run whoami without become.
# command: whoami
# changed_when: false
# become: false
# register: whoami
# - name: Set a fact with the user name.
# set_fact:
# login_user: "{{ whoami.stdout }}"
9 months ago
# - name: Update Ubuntu
# apt:
# upgrade: true
# update_cache: true
# become: true