Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
337de79c
Commit
337de79c
authored
Mar 30, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add sudo/port info to examples, and sudo info to playbooks.
parent
f316c1b1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
rst/examples.rst
+13
-1
rst/playbooks.rst
+7
-1
No files found.
rst/examples.rst
View file @
337de79c
...
...
@@ -21,7 +21,19 @@ Now to run the command on all servers in a group, in this case, 'atlanta'::
ansible atlanta -a "/sbin/reboot" -f 10
If you didn't read about patterns and groups yet, go back and read :doc:`patterns`.
If you want to run commands as a different user than root::
ansible atlanta -a "/usr/bin/foo" -u yourname
If you want to run commands through sudo::
ansible atlanta -a "/usr/bin/foo" -u yourname --sudo
If you need to access SSH on a different port::
ansible atlanta -a "/usr/bin/foo" -p 2112
Ok, so those are basics. If you didn't read about patterns and groups yet, go back and read :doc:`patterns`.
The -f 10 in the above specifies the usage of 10 simultaneous processes. Normally commands also take
a `-m` for module name, but the default module name is 'command', so we didn't need to specify that
...
...
rst/playbooks.rst
View file @
337de79c
...
...
@@ -73,7 +73,13 @@ documentation. The `user` is just the name of the user account::
user: root
Support for running things from sudo is pending.
Support for running things from sudo is also available. Sudo must be
configured to not require a password.
---
- hosts: webservers
user: yourname
sudo: True
Vars section
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment