whoami
This commit is contained in:
		| @@ -1,5 +1,14 @@ | |||||||
| - hosts: all | - hosts: all | ||||||
|   tasks: |   tasks: | ||||||
|  |   - 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 |   - name: Update Ubuntu | ||||||
|     apt: |     apt: | ||||||
|       upgrade: true |       upgrade: true | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 alecsandruchirosca
					alecsandruchirosca