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
8b695311
Commit
8b695311
authored
Mar 05, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #79 from tbielawa/modpath
Read some defaults from the environment
parents
3c20f400
c5f8bc9d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
14 deletions
+47
-14
docs/man/man1/ansible.1.asciidoc
+13
-3
docs/man/man5/ansible-modules.5.asciidoc
+10
-3
docs/man/man5/ansible-playbook.5.asciidoc
+11
-5
hacking/env-setup
+6
-0
lib/ansible/constants.py
+7
-3
No files found.
docs/man/man1/ansible.1.asciidoc
View file @
8b695311
...
@@ -25,7 +25,7 @@ SSH.
...
@@ -25,7 +25,7 @@ SSH.
ARGUMENTS
ARGUMENTS
---------
---------
*host
spec*
*host
-pattern*::
A name of a group in the inventory file, a shell-like glob selecting hosts in inventory
A name of a group in the inventory file, a shell-like glob selecting hosts in inventory
file, or any combination of the two seperated by semicolons.
file, or any combination of the two seperated by semicolons.
...
@@ -75,6 +75,16 @@ FILES
...
@@ -75,6 +75,16 @@ FILES
/usr/share/ansible -- Default module library
/usr/share/ansible -- Default module library
ENVIRONMENT
-----------
The following environment variables may specified.
ANSIBLE_HOSTS -- Override the default ansible hosts file
ANSIBLE_LIBRARY -- Override the default ansible module library path
AUTHOR
AUTHOR
------
------
...
@@ -95,7 +105,7 @@ SEE ALSO
...
@@ -95,7 +105,7 @@ SEE ALSO
Ansible home page: <https://github.com/mpdehaan/ansible/>
Ansible home page: <https://github.com/mpdehaan/ansible/>
*ansible-modules*(5)
,
*ansible-modules*(5)
*ansible-playbook*(5)
,
*ansible-playbook*(5)
docs/man/man5/ansible-modules.5.asciidoc
View file @
8b695311
...
@@ -3,7 +3,7 @@ ansible-modules(5)
...
@@ -3,7 +3,7 @@ ansible-modules(5)
:doctype:manpage
:doctype:manpage
:man source: Ansible-modules
:man source: Ansible-modules
:man version: 0.0.1
:man version: 0.0.1
:man manual:
System administration commands
:man manual:
Ansible
NAME
NAME
...
@@ -23,7 +23,7 @@ IDEMPOTENCE
...
@@ -23,7 +23,7 @@ IDEMPOTENCE
Most modules other than command are idempotent, meaning they will seek to avoid changes
Most modules other than command are idempotent, meaning they will seek to avoid changes
unless a change needs to be made. When using ansible playbooks, these modules can
unless a change needs to be made. When using ansible playbooks, these modules can
trigger change events, as described in
ansible-playbooks (5).
trigger change events, as described in
*ansible-playbooks*(5).
Unless otherwise noted, all modules support change hooks.
Unless otherwise noted, all modules support change hooks.
...
@@ -148,7 +148,7 @@ setup
...
@@ -148,7 +148,7 @@ setup
Writes a JSON file containing key/value data, for use in templating.
Writes a JSON file containing key/value data, for use in templating.
Call this once before using the template modules, usually as the very
Call this once before using the template modules, usually as the very
first step in your playbook.
first step in your playbook.
If facter or ohai are installed, variables from these programs will also
If facter or ohai are installed, variables from these programs will also
be snapshotted into the JSON file for usage in templating. These variables
be snapshotted into the JSON file for usage in templating. These variables
...
@@ -212,6 +212,13 @@ To support change hooks, modules should return hashes, with a changed: True/Fals
...
@@ -212,6 +212,13 @@ To support change hooks, modules should return hashes, with a changed: True/Fals
element at the top level. Modules can also choose to indicate a failure scenario
element at the top level. Modules can also choose to indicate a failure scenario
by returning a top level 'failure' element with a True value.
by returning a top level 'failure' element with a True value.
ENVIRONMENT
-----------
ANSIBLE_LIBRARY -- Override the default ansible module library path
AUTHOR
AUTHOR
------
------
...
...
docs/man/man5/ansible-playbook.5.asciidoc
View file @
8b695311
...
@@ -3,7 +3,7 @@ ansible-modules(5)
...
@@ -3,7 +3,7 @@ ansible-modules(5)
:doctype:manpage
:doctype:manpage
:man source: Ansible-playbook
:man source: Ansible-playbook
:man version: 0.0.1
:man version: 0.0.1
:man manual:
System administration commands
:man manual:
Ansible
NAME
NAME
...
@@ -28,13 +28,13 @@ Playbooks are written in YAML.
...
@@ -28,13 +28,13 @@ Playbooks are written in YAML.
EXAMPLE
EXAMPLE
-------
-------
see
See:
https://github.com/mpdehaan/ansible/blob/master/examples/playbook.yml
-
https://github.com/mpdehaan/ansible/blob/master/examples/playbook.yml
https://github.com/mpdehaan/ansible/blob/master/examples/base.yml
-
https://github.com/mpdehaan/ansible/blob/master/examples/base.yml
https://github.com/mpdehaan/ansible/blob/master/examples/handlers.yml
-
https://github.com/mpdehaan/ansible/blob/master/examples/handlers.yml
WHAT THE EXAMPLE MEANS
WHAT THE EXAMPLE MEANS
-----------------------
-----------------------
...
@@ -100,6 +100,12 @@ If a host has a failure, the host will be ignored for the remainder
...
@@ -100,6 +100,12 @@ If a host has a failure, the host will be ignored for the remainder
of the playbook execution.
of the playbook execution.
ENVIRONMENT
-----------
ANSIBLE_LIBRARY -- Override the default ansible module library path
AUTHOR
AUTHOR
------
------
...
...
hacking/env-setup
View file @
8b695311
...
@@ -2,10 +2,16 @@
...
@@ -2,10 +2,16 @@
PREFIX_PYTHONPATH="`pwd`/lib/ansible:`pwd`/lib"
PREFIX_PYTHONPATH="`pwd`/lib/ansible:`pwd`/lib"
PREFIX_PATH="`pwd`/bin"
PREFIX_PATH="`pwd`/bin"
PREFIX_MANPATH="`pwd`/docs/man"
PREFIX_MANPATH="`pwd`/docs/man"
PREFIX_ANS_LIBRARY="`pwd`/library"
echo "Prefixing PYTHONPATH with $PREFIX_PYTHONPATH"
echo "Prefixing PYTHONPATH with $PREFIX_PYTHONPATH"
export PYTHONPATH=$PREFIX_PYTHONPATH:$PYTHONPATH
export PYTHONPATH=$PREFIX_PYTHONPATH:$PYTHONPATH
echo "Prefixing PATH with $PREFIX_PATH"
echo "Prefixing PATH with $PREFIX_PATH"
export PATH=$PREFIX_PATH:$PATH
export PATH=$PREFIX_PATH:$PATH
echo "Prefixing MANPATH with $PREFIX_MANPATH"
echo "Prefixing MANPATH with $PREFIX_MANPATH"
export MANPATH=$PREFIX_MANPATH:$MANPATH
export MANPATH=$PREFIX_MANPATH:$MANPATH
echo "Setting ANSIBLE_LIBRARY to ${PREFIX_ANS_LIBRARY}"
export ANSIBLE_LIBRARY=${PREFIX_ANS_LIBRARY}
lib/ansible/constants.py
View file @
8b695311
...
@@ -16,9 +16,14 @@
...
@@ -16,9 +16,14 @@
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
#
#
import
os
# control side (aka 'overlord')
# control side (aka 'overlord')
DEFAULT_HOST_LIST
=
'/etc/ansible/hosts'
DEFAULT_HOST_LIST
=
os
.
environ
.
get
(
'ANSIBLE_HOSTS'
,
DEFAULT_MODULE_PATH
=
'/usr/share/ansible'
'/etc/ansible/hosts'
)
DEFAULT_MODULE_PATH
=
os
.
environ
.
get
(
'ANSIBLE_LIBRARY'
,
'/usr/share/ansible'
)
DEFAULT_MODULE_NAME
=
'command'
DEFAULT_MODULE_NAME
=
'command'
DEFAULT_PATTERN
=
'*'
DEFAULT_PATTERN
=
'*'
DEFAULT_FORKS
=
5
DEFAULT_FORKS
=
5
...
@@ -26,4 +31,3 @@ DEFAULT_MODULE_ARGS = ''
...
@@ -26,4 +31,3 @@ DEFAULT_MODULE_ARGS = ''
DEFAULT_TIMEOUT
=
10
DEFAULT_TIMEOUT
=
10
DEFAULT_REMOTE_USER
=
'root'
DEFAULT_REMOTE_USER
=
'root'
DEFAULT_REMOTE_PASS
=
None
DEFAULT_REMOTE_PASS
=
None
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