mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
API docs update + fix -u reference
This commit is contained in:
parent
edd2a3c6ed
commit
566f220d16
5 changed files with 78 additions and 28 deletions
|
@ -361,9 +361,10 @@ bserver.example.org</pre>
|
|||
<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>ansible all -m ping
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>If you want to access machines remotely as a different user than root,
|
||||
you will want to specify the ‘-u’ option to ansible. If you would
|
||||
like to access sudo mode, there are also flags to do that:</p>
|
||||
<p>In Ansible 0.7 and later, ansible will attempt to remote connect to the machines using your current
|
||||
user name, just like SSH would. In 0.6 and before, this actually defaults to ‘root’ (we liked the current
|
||||
user behavior better). To override the remote user name, just use the ‘-u’ parameter.</p>
|
||||
<p>If you would like to access sudo mode, there are also flags to do that:</p>
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span class="c"># as bruce</span>
|
||||
<span class="nv">$ </span>ansible all -m ping -u bruce
|
||||
<span class="c"># as bruce, sudoing to root</span>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue