alecsandruchirosca 9 months ago
parent 4c8184b385
commit c3ab24a1d1
  1. 16
      update.yml

@ -1,14 +1,18 @@
- hosts: all - hosts: all
tasks: tasks:
- name: Run whoami without become. - name: get user
command: whoami command: whoami
changed_when: false
become: false
register: whoami register: whoami
- name: Set a fact with the user name. # - name: Run whoami without become.
set_fact: # command: whoami
login_user: "{{ whoami.stdout }}" # changed_when: false
# become: false
# register: whoami
# - name: Set a fact with the user name.
# set_fact:
# login_user: "{{ whoami.stdout }}"
# - name: Update Ubuntu # - name: Update Ubuntu
# apt: # apt:
# upgrade: true # upgrade: true

Loading…
Cancel
Save