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