mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-24 13:04:00 -07:00
Document per task remote_user, based on #3932
This commit is contained in:
parent
69fa5954fd
commit
6b60267898
1 changed files with 15 additions and 0 deletions
|
|
@ -103,6 +103,21 @@ documentation. The `remote_user` is just the name of the user account::
|
||||||
|
|
||||||
The `remote_user` parameter was formerly called just `user`. It was renamed in Ansible 1.4 to make it more distinguishable from the `user` module (used to create users on remote systems).
|
The `remote_user` parameter was formerly called just `user`. It was renamed in Ansible 1.4 to make it more distinguishable from the `user` module (used to create users on remote systems).
|
||||||
|
|
||||||
|
Remote users can also be defined per task::
|
||||||
|
|
||||||
|
---
|
||||||
|
- hosts: webservers
|
||||||
|
remote_user: root
|
||||||
|
tasks:
|
||||||
|
- name: test connection
|
||||||
|
ping:
|
||||||
|
remote_user: yourname
|
||||||
|
|
||||||
|
.. Note::
|
||||||
|
|
||||||
|
The `remote_user` parameter for tasks was added in 1.4.
|
||||||
|
|
||||||
|
|
||||||
Support for running things from sudo is also available::
|
Support for running things from sudo is also available::
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue