Commit graph

540 commits

Author SHA1 Message Date
Josh Smift
81d7e132f9 force deletion of .pyc files (#17109) 2016-08-17 00:43:10 +02:00
Matt Davis
525c0469d2 tweak hacking/env-setup to work under ash (#17054) 2016-08-11 16:58:08 -07:00
Toshio Kuratomi
48a2773463 Find places where ziploader is used and change them to ansiballz so that people aren't confused when they google for information.information (#16715) 2016-07-21 10:58:24 -07:00
Adrian Likins
a1c21f8400 Fewer deps for 'make webdocs' from top level
Previously it also built the MANPAGES target
requiring asciidoc and libxml, before starting
a 'make docs' in docsite.

Also change the #! line in
hacking/dump_playbook_attributes.py to not specify
python2... yet.
2016-06-28 11:01:42 -04:00
André Pinto
fa4011c6c3 Do not corrupt $MANPATH when it's not present (#16300)
Fixes #16299
2016-06-15 11:41:14 -04:00
Matt Davis
ec2cb07988 Make 'required' optional in module docs (#15906)
Updated module dev docs, doc build, ansible-doc to match
2016-05-18 16:57:36 -07:00
Brian Coca
71a707fba5 quick yaml syntax checker 2016-05-18 18:15:12 -04:00
Brian Coca
478674cc57 typo fix 2016-05-05 17:05:46 -04:00
Brian Coca
b7c874f81a enforce required 'required' in docs 2016-05-05 16:55:18 -04:00
Robin Roth
1d6608e84f Dist version fix for Red Hat and more tests (#15663)
* add tests for centos6, rhel6 and rhel7

* gen_distribution_version_testcase with python2.6

* remove unused imports

* fix redhat/vmware/... parsing

* add centos7 test case
2016-04-29 13:18:50 -07:00
Brett Inman
1f89a46b52 Make -q flag totally quiet for env-setup.fish
The first echo and setup.py steps are not quiet and result in output that is annoying if your Fish is configured to source the file.
2016-04-27 11:34:51 -07:00
Toshio Kuratomi
2762f12f7f Remove the duplicate modstyle parameter 2016-04-27 10:04:16 -07:00
Toshio Kuratomi
bdd73e31dc Have test-module clean up the local temp dir when it exits
Get test-module's debugger switch to do something useful with ziploader modules
2016-04-24 20:44:42 -07:00
Toshio Kuratomi
7833b5bec4 Merge pull request #15420 from robinro/distribution_version_tests
Distribution version tests
2016-04-18 10:05:55 -07:00
Robin Roth
692bf51fde move gen_testcase to hacking/tests
* also use json instead of pprint
2016-04-15 17:14:43 +02:00
Toshio Kuratomi
669f3dc3a8 Cleanup. Since we no longer pass a lock, we no longer need to create it 2016-04-14 11:59:06 -07:00
Toshio Kuratomi
d78ba34cf0 We switched away from passing the lock via the arguments to modify_module
Need to fix test-module to not pass the lock either
2016-04-13 13:35:51 -07:00
Toshio Kuratomi
dcc5dfdf81 Controller-side module caching.
This makes our recursive, ast.parse performance measures as fast as
pre-ziploader baseline.

Since this unittest isn't testing that the returned module data is
correct we don't need to worry about os.rename not having any module
data.  Should devise a separate test for the module and caching code
2016-04-12 08:01:07 -07:00
Toshio Kuratomi
b27c424fa1 Fixes to the documentation build (#15356)
* Could only have one alias before.  Subsequent aliases overrode the
  previous ones.  Now multiple aliases work.
* Fix BLACKLISTED_MODULES.   Previously, modules were listed in the
  generated documentation despite being blacklisted
* Deprecated modules form extras were showing the (E) tag and not the
  (D) tag. Reversed that now (Probably not necessary to also show the
  E tag).
* Sort the deprecated modules alphabetically in the Category docs as
  well as the list of all modules
* Optimization: Previously rendered the modules to rst twice once in all
  group and once in individual categories.  Fixed to only render them
  once.
* Add fireball to blacklist and remove async_status (as people need to
  use that).
2016-04-11 17:11:55 -07:00
Toshio Kuratomi
a330a24ccc Python2.6 fix for test-module 2016-04-11 12:13:31 -07:00
Toshio Kuratomi
4b0aa1214c Ziploader
* Ziploader proof of concept (jimi-c)

* Cleanups to proof of concept ziploader branch:

* python3 compatible base64 encoding
* zipfile compression (still need to enable toggling this off for
  systems without zlib support in python)
* Allow non-wildcard imports (still need to make this recusrsive so that
  we can have module_utils code that imports other module_utils code.)
* Better tracebacks: module filename is kept and module_utils directory
  is kept so that tracebacks show the real filenames that the errors
  appear in.

* Make sure we import modules that are used into the module_utils files that they are used in.

* Set ansible version in a more pythonic way for ziploader than we were doing in module replacer

* Make it possible to set the module compression as an inventory var

This may be necessary on systems where python has been compiled without
zlib compression.

* Refactoring of module_common code:

* module replacer only replaces values that make sense for that type of
  file (example: don't attempt to replace python imports if we're in
  a powershell module).
* Implement configurable shebang support for ziploader wrapper
* Implement client-side constants (for SELINUX_SPECIAL_FS and SYSLOG)
  via environment variable.
* Remove strip_comments param as we're never going to use it (ruins line
  numbering)

* Don't repeat ourselves about detecting REPLACER

* Add an easy way to debug

* Port test-module to the ziploader-aware modify_module()

* strip comments and blank lines from the wrapper so we send less over the wire.

* Comments cleanup

* Remember to output write the module line itself in powershell modules

* for line in lines strips the newlines so we have to add them back in
2016-04-05 11:06:17 -07:00
Brian Coca
6a85da7e0c avoid private attributes
hardcode adding with_ for tasks
2016-03-10 01:00:33 -05:00
Brian Coca
e1faa78722 fixed typo 2016-02-29 17:52:55 -05:00
Brian Coca
cbc797a7ed added missing : 2016-02-26 16:27:10 -05:00
Brian Coca
a3489408a5 fixes to playbooks_directives generation
order is now predictable
now correctly substitutes loop for with_
adds local_action to action
2016-02-26 16:18:55 -05:00
Brian Coca
3e28ee0fd4 avoid printing internal loop and loop_args 2016-02-25 19:58:44 -05:00
Brian Coca
fbdcb22e36 now generate list of playbook ojbect directives
TODO: needs links/info and conditionals added
2016-02-25 16:48:37 -05:00
Brian Coca
fe09f7ee49 clarify that requirements are on host that runs it
fixes http://github.com/ansible/ansible-modules-core/issues/3061
2016-02-18 05:09:42 -08:00
Brian Coca
6414c967e4 now check for description and listify if needed
fixes #14371
2016-02-08 12:34:26 -05:00
Toshio Kuratomi
5cd3f71792 Handle utf-8 in module short desc 2016-02-02 13:00:24 -08:00
Jeremy Audet
5cac8efd73 Make "make webdocs" compatible with Python 3
The `webdocs` make target fails under Python 3. It fails due to a variety of
syntax errors, such as the use of `except Foo, e` and `print 'foo'`. Fix #13463
by making code compatible with both Python 2 and 3.
2015-12-08 12:00:53 -05:00
Patrik Lundin
9f9944e355 Replace -delete with portable -exec rm {} \;
Needed on OpenBSD which does not support -delete.
2015-12-02 11:06:09 +01:00
Alberto Gireud
52ded67db5 Update check mode argument 2015-11-08 20:55:10 -06:00
Brian Coca
4a206cdde9 force egg deletion 2015-11-02 11:58:20 -05:00
Brian Coca
5719912e7f added a skip for the test dir in module repos 2015-10-27 19:59:43 -04:00
Toshio Kuratomi
4203850d1a Break apart a looped dependency to show a warning when parsing playbooks
Display a warning when a dict key is overwritten by pyyaml
Fixes #12888
2015-10-27 12:39:42 -07:00
Toshio Kuratomi
baa309309d Bundle a new version of python-six for compatibility along with some code to make it easy for distributions to override the bunndled copy if they have a new enough version. 2015-10-16 08:21:28 -07:00
Brian Coca
3a0bf55ae3 better error catching for doc build 2015-10-13 11:14:28 -04:00
James Cammarata
a431121f9f Tweak to hacking path fix to go back to subshell use 2015-09-17 15:26:45 -04:00
EC
bcdb4e78ae Allow env-setup to use spaces in full path 2015-09-17 15:11:25 -04:00
Marius Gedminas
823677b490 Replace .iteritems() with six.iteritems()
Replace .iteritems() with six.iteritems() everywhere except in
module_utils (because there's no 'six' on the remote host).  And except
in lib/ansible/galaxy/data/metadata_template.j2, because I'm not sure
six is available there.
2015-09-03 09:23:27 +03:00
Luke Rohde
cba4642d8d Use find ... -delete instead of non-portable globbing 2015-09-02 17:05:16 -04:00
Luke Rohde
647e48f776 Delete all compiled python files when running hacking/env-setup 2015-09-02 14:49:02 -04:00
Kevin Houdebert
b8c9391d0c Change to python3 syntax 2015-08-31 02:35:14 +02:00
Jody Frankowski
bc1e1d2cdc Fix rm call in hacking/env-setup. Since it is sourced from a user shell,
rm can have an alias to 'rm -i', which will make sourcing hang when '-q'
is enabled.
2015-08-15 00:43:45 +02:00
Abhijit Menon-Sen
114070c226 Add missing $ 2015-08-07 09:41:29 +05:30
Brian Coca
636f88fd31 Merge pull request #9438 from binarytemple/patch-1
export ANSIBLE_HOME so it can be used in scripts
2015-08-06 23:59:21 -04:00
Toshio Kuratomi
53ae326603 Port some things in test-module to v2.
In particular, fix arg parsing

Fixes #11820
2015-07-31 20:40:07 -07:00
Brian Coca
f5c8055879 removed debug stuff 2015-07-28 15:25:17 -04:00
Brian Coca
a78fdde32c better handling for weird doc corner cases (abscense of options, bad text objects, etc)
also updated extras to get some docfixes on the module side
2015-07-28 14:30:46 -04:00
bryan hunt
7a76fcb159 merged 2015-07-27 11:57:58 +01:00
Sheldon Hearn
c800a1c68a Preserve OLDPWD 2015-07-23 11:24:30 +02:00
Brian Coca
ae54792a35 Merge pull request #11688 from amenonsen/8935-rebase
8935 rebase: add «-o outputfile» and -n(oexec) options to hacking/test-module
2015-07-21 21:31:39 -04:00
Brian Coca
d3fe9b3194 Merge pull request #11084 from echiu64/devel
More complex example of using test-module
2015-07-21 21:29:25 -04:00
Abhijit Menon-Sen
8342cc6b61 Fix existing typo, remove trailing space added by PR commit 2015-07-22 06:53:59 +05:30
Will Thames
b05485d4b3 Add options to control output and execution of test-module
test-module is useful but sometimes you want to edit the
result before running it to e.g. set a debug point.

Added a noexecute option (i.e. just create the module script, don't
run it) and an output option to choose the filename of the result.
2015-07-22 06:50:37 +05:30
Brian Coca
c40541964b Merge pull request #11637 from bcoca/moar_docs
Moar docs
2015-07-20 22:31:34 -04:00
Brian Coca
740f15cb0d just remove version_added when to old, not the whole option! 2015-07-20 22:31:20 -04:00
Brian Coca
9de086d16d removed merges from count 2015-07-18 22:49:50 -04:00
Brian Coca
173f27531c moar docs
added docs for new v2 features
restructures modules bar and core/extras info into their own pages
changed templates to refer to the new pages
added some missing ansible.cfg options
more info on gathering setting
2015-07-17 22:53:11 -04:00
Brian Coca
6ba706f753 minor doc reformatting
now version_added < 1.3 does not get shown, up from 1.0
option's version_added is also now filterd against this threshold
module version_added is more prominent
exaples now uses pure rst instead of intermingled with html formatting
aliases now shown in description for options
bad version fields now throw warnings instead of exceptions
ansible-doc errors now show traceback in very very verbose mode, for easier debugging
2015-07-17 10:07:22 -04:00
Brian Coca
811b10d132 docs will not mention versions older than 1.5 2015-07-17 10:07:22 -04:00
Brian Coca
1aeb66148b actually now does what it says as it was just sorting by name 2015-07-17 10:07:22 -04:00
Gerard Lynch
2f51f3bbc5 updated to use new loader 2015-07-17 11:44:00 +01:00
Brian Coca
95bf78d0e7 Merge pull request #11618 from halberom/test-module
hacking/test-module, updated to new location and non-classness of module_common
2015-07-16 19:01:35 -04:00
Gerard Lynch
3c7a502c50 updated to new location and non-classness of module_common 2015-07-16 23:56:18 +01:00
Brian Coca
f146c7680f Merge pull request #10928 from gimoh/test-module-default-python
Use same interpreter for test-module and module it runs
2015-07-16 18:48:00 -04:00
Marc Abramowitz
3b0524e67d hacking/test-module: Style nit 2015-07-02 18:59:58 +00:00
Marc Abramowitz
5466ff8907 hacking/test-module: Deal with move of parse_kv 2015-07-02 18:58:57 +00:00
Marc Abramowitz
ea6ec3bf2c Make test-module work in v2
- `jsonify` moved from `ansible.utils` to `ansible.parsing.utils.jsonify`
- I don't see `ansible.utils.parse_json` anymore so I used `json.loads`.
2015-07-02 18:16:33 +00:00
Brian Coca
0826106441 minor docs reformat
- clearer 'version added' for module options, now it sits under the option name
- made notes a section, so it now appears in toc
- moved requirements and made it a list, more prominent and more readable
2015-06-03 22:19:26 -04:00
James Cammarata
2bad888f28 Merge branch 'v2_final' into devel_switch_v2
Conflicts:
	lib/ansible/inventory/__init__.py
	lib/ansible/modules/core
	lib/ansible/utils/__init__.py
	lib/ansible/utils/module_docs.py
2015-05-28 15:26:03 -05:00
Edwin Chiu
aef76cc701 More complex example of using test-module 2015-05-28 14:43:25 -04:00
Florian Apolloner
3010190592 Fixing up the hacking module_formatter code for v2 2015-05-23 08:42:17 -05:00
Michael Scherer
85aa984340 Fix error in the column name in the doc 2015-05-15 01:05:38 -04:00
gimoh
5489d172de Use same interpreter for test-module and module it runs
Default python interpreter to the same interpreter the test-module
script is executed with.  This is so that the interpreter doesn't have
to be specified twice in the command when using non-default python
(e.g. ``/path/to/python ./hacking/test-module -I python=/path/to/python ...``)
2015-05-06 11:57:25 +01:00
Toshio Kuratomi
4c8d27f7bb Make module formatting into links to the other module docs 2015-05-05 13:51:22 -07:00
Matt Martz
104b2036f7 egg_info is now written directly to lib 2015-03-27 12:03:20 -05:00
Brian Coca
b6ec502983 added missing element to make google groups link a actual link 2015-03-24 21:09:45 -04:00
Ján Dzurek
cf6155f1c2 rst.j2 template better core module source wording 2015-03-24 20:00:51 +01:00
Brian Coca
c3076b8478 added module returnval documentation to web docs 2015-03-20 16:55:03 -04:00
Brian Coca
2cacac4b23 minor adjustments to formatting 2015-03-20 16:55:03 -04:00
Brian Coca
94909bd4a2 Added return values documentation to modules 2015-03-20 16:55:03 -04:00
Toshio Kuratomi
caf2a96ef9 Merge pdksh fix to v2 2015-03-15 13:22:07 -07:00
Patrik Lundin
731b268cd6 env-setup: Don't use ${.sh.file} if shell is pdksh
The default ksh in OpenBSD throws the following error:
===
$ . hacking/env-setup
ksh: hacking/env-setup[23]: ${.sh.file}": bad substitution
[...]
===

The same error can be seen on Linux if pdksh is used.
2015-03-15 10:46:21 +01:00
bmoar
1eaa9d4a08 fix path in Test-module example 2015-03-05 20:30:00 -05:00
Brian Coca
68a06e542d Merge pull request #9666 from follower/patch-8
Correct typo of "actively" (Attempt #2)
2015-02-26 23:05:28 -05:00
Brian Coca
ee08448b2e now module_formatter handles new expanded return values from the module_docs (still does not thing with new return value docs) 2015-02-19 18:07:05 -05:00
Alexey Shamrin
b950a38e30 fix links to ansible-devel in documentation pages 2015-02-17 14:30:31 +03:00
Toshio Kuratomi
7c86db3187 Add KSH compat
cherry picked from https://github.com/ansible/ansible/pull/6899
2015-02-09 15:37:35 -08:00
ZhiFeng Hu
e63c03d60f Move update.sh to hacking repository ,see #10081 2015-01-30 14:19:47 +08:00
rpe-github
0a73067153 Use basename -- $0 in case $0 starts with a dash.
For example, pdksh $0 contains '-ksh'.
2015-01-25 23:13:54 +01:00
Marco Ippolito
23da2f6415 Redundant file descriptor specifier 2015-01-19 09:03:15 -08:00
Marco Ippolito
4cd5be396d BUG! Incorrect order of redirection AND incorrect redirection syntax
The replaced code only created a text file called `1' in the
current directory, it did *not* redirect output.
2015-01-19 09:03:15 -08:00
Marco Ippolito
bc0f0f838e More elegant output using here-document syntax
POSIX section 2.7.4 defines here-documents.
2015-01-19 09:03:15 -08:00
Marco Ippolito
7eb278e797 Identified two verbosity levels: info, silent
Conflicts:
	hacking/env-setup
2015-01-19 09:03:15 -08:00
Marco Ippolito
9bc1e1a4a0 Reserve capitalised identifiers for system variables
Conflicts:
	hacking/env-setup
2015-01-19 09:03:15 -08:00
Marco Ippolito
53fadd371b No need to prepend `.' to a relative path 2015-01-19 09:03:14 -08:00
Toshio Kuratomi
566a8d1b9d Fix issue with mixing quoting and glo9bbing. 2015-01-18 10:29:07 -08:00
Toshio Kuratomi
365af69c3e More quotes and reimplement without pushd/popd 2015-01-18 08:17:37 -08:00
Toshio Kuratomi
dde32a826f Set default values for shell variables that we use
Fixes #9991
2015-01-15 11:08:00 -08:00
Toshio Kuratomi
09e556e9a4 Get rid of bash compound command to make more portable 2015-01-13 11:38:06 -08:00
Toshio Kuratomi
245f934629 Remove shebang and execute perms for env-setup since it must be sourced 2015-01-12 08:03:53 -08:00
Marco Ippolito
b688570380 Corrected quoting of parameter expansions in hacking/env-setup
Conflicts:
	hacking/env-setup
2015-01-10 17:29:56 -08:00
Marco Ippolito
b8921706f8 Prefer modern-style Bash command substitution in hacking/env-setup
Conflicts:
	hacking/env-setup
2015-01-10 17:26:19 -08:00
Marco Ippolito
31c8523371 Updated shebang from #!/bin/bash to #!/usr/bin/env bash (more flexible) 2015-01-10 17:21:43 -08:00
Brian Coca
88443d6dcf Merge pull request #7306 from abadger/feature/egg-info
Feature/egg info
2014-12-15 16:26:37 -05:00
Veres Lajos
bf5d8ee678 typofixes - https://github.com/vlajos/misspell_fixer 2014-12-04 22:23:35 +00:00
follower
8b278fee51 Correct typo of "actively" (Attempt #2) 2014-11-29 18:29:09 +13:00
follower
a1c5294882 Fix misspelled "necessarily" 2014-11-29 14:55:25 +13:00
Brian Coca
339d1ccc8b fixed issue with subclasses across the repos clobbering each other, they
now merge
2014-11-04 20:54:55 -05:00
Brian Coca
2ba5c3c66b added blank line before section to avoid sphinx warnings 2014-11-04 18:14:30 -05:00
Michael DeHaan
c551fe8b50 Clarify module list footer. 2014-11-04 17:38:02 -05:00
Brian Coca
12393a4b47 subcategories are now Title case and _ gets changed to a space 2014-11-04 08:44:39 -05:00
Brian Coca
5f1ad79cd3 now correctly flags and sorts subcategory modules 2014-11-03 23:14:22 -05:00
Brian Coca
650048f7dd now displays subcategories correctly 2014-11-03 22:02:13 -05:00
Brian Coca
7bd2c945a7 now doc generation does not ignore subdirs of cloud 2014-11-03 08:15:26 -05:00
Brian Coca
80b1365d53 now correctly processes modules when in subdirs of cloud 2014-11-01 23:19:25 -04:00
Brian Coca
f6d9aa7a8f corrected text/flag 2014-10-31 16:05:22 -04:00
Brian Coca
023f5fd7e0 Added note explaning the module tagging 2014-10-31 15:06:00 -04:00
Brian Coca
44f0279d0a Now adds flags for non core and deprecated modules in listing 2014-10-31 14:20:26 -04:00
Brian Coca
86de59235f bypass core/extras text when module is deprecated 2014-10-31 14:18:18 -04:00
Brian Coca
8b5b97d066 now docs handle deprecated modules but still ignore aliases 2014-10-30 13:29:54 -04:00
Brian Coca
27d741102c Created Deprecated module category that only appears when there is
something to show
2014-10-30 11:26:43 -04:00
Bryan Hunt
e5f651c458 export ANSIBLE_HOME so it can be used in scripts
In order that scripts like this can work 
```
#!/bin/bash
ansible -vvvv tag_instance_type_foo-training -i "${ANSIBLE_HOME}/plugins/inventory/ec2.py" --private-key=~/Downloads/foo-training.pem -u ec2-user -m ping
```
2014-10-28 20:19:15 +00:00
Brian Coca
5ab4467708 module formatter skips modules with leading underscore to avoid
documenting them. Soon will be patched to recognize them as either
deprecated or an alias
2014-10-28 08:36:31 -07:00
Toshio Kuratomi
1e12d3028c Merge pull request #9384 from insaneirish/devel
Change "usuable" to "usable".
2014-10-20 22:08:52 -04:00
insaneirish
3d257bc695 Change "usuable" to "usable". 2014-10-20 10:12:51 -04:00
Igor Vuk
e19f3f8a5c Typo: greatful -> grateful 2014-10-15 21:08:38 +02:00
Baptiste Mathus
2845f0c455 Typo: recieve -> receive. 2014-10-13 22:10:39 +02:00
Michael DeHaan
2211ae113c Update rst.j2
typo fix
2014-09-29 18:01:16 -04:00
Martin Ueding
dc750e6526 Fix link in reST template
There was a missing trailing underscore (`_`) that would have marked the
content in the backticks as a link. This adds it and fixes the link on
every core module page.
2014-09-28 15:27:08 +02:00
Michael DeHaan
ffee9a8fe0 Docsite formatting 2014-09-26 18:23:57 -04:00
Michael DeHaan
7f6ab89b5b hacking/env-setup no longer needs to set library since modules appear as git submodules. 2014-09-26 17:59:46 -04:00
Michael DeHaan
e8fe306cef Some various comments about the new repos, more to likely come. 2014-09-26 17:52:50 -04:00
Michael DeHaan
bceb0026a5 Updating the module formatter to deal with the new repo structure. 2014-09-26 17:10:13 -04:00
Michael DeHaan
b818fbb305 Modules are almost always written now by mutliple authors, so don't show this field on website, since it grows obsolete and does not take into account all contributors.
Contributors are still listed on github module source and in repo, and original authors still in the file for when development questions arise, but want
to funnel support questions to the mailing list versus directly to them.
2014-09-10 09:42:24 -04:00
Michael Salmon
e827ec702e Fix issue #8578. Setting envvar in ""'s ensures the PYTHONPATH is set to
include the lib/ directory.

Before - PYTHONPATH is empty.. ansible fails to run

    $ source hacking/env-setup.fish
    Appending PYTHONPATH

    Setting up Ansible to run out of checkout...

    PATH=/Volumes/opt/src/ansible/bin /usr/local/share/python3 /usr/local/bin
    /usr/bin /bin /usr/sbin /sbin /usr/local/bin /opt/X11/bin /usr/bin /sbin
    /usr/local/bin /Users/ms/bin/
    PYTHONPATH=
    ANSIBLE_LIBRARY=/Volumes/opt/src/ansible/library
    ...

    Traceback (most recent call last):
      File "/Volumes/opt/src/ansible/bin/ansible", line 25, in <module>
          from ansible.runner import Runner
          ImportError: No module named ansible.runner

After change - it's set.. ansible runs.

    source hacking/env-setup.fish
    Appending PYTHONPATH

    Setting up Ansible to run out of checkout...

    PATH=/Volumes/opt/src/ansible/bin /usr/local/share/python3 /usr/local/bin
    /usr/bin /bin /usr/sbin /sbin /usr/local/bin /opt/X11/bin /usr/bin /sbin
    /usr/local/bin /Users/ms/bin/
    PYTHONPATH=/Volumes/opt/src/ansible/lib:
    ANSIBLE_LIBRARY=/Volumes/opt/src/ansible/library
    ....

    $ ansible
    Usage: ansible <host-pattern> [options]
2014-08-12 12:09:20 -07:00
Hector Acosta
b8cbf1370f Add checkmode support for test-module script
Signed-off-by: Hector Acosta <hector.acosta@gmail.com>
2014-07-20 13:54:30 -05:00
Michael DeHaan
dfd4f18095 Docsite things. 2014-06-19 14:25:28 -05:00
Toshio Kuratomi
6a6060ac55 Teach env-setup how to create egg-info for ansible so that pkg_resources works 2014-05-06 11:19:41 -07:00
Felix Kaiser
3b06ab84e3 Make test-module interpret --args='{...' as yaml 2014-04-10 21:14:42 +02:00
Max Riveiro
9f7342d46d
Add tesing deps installation into hacking/README
Signed-off-by: Max Riveiro <kavu13@gmail.com>
2014-03-23 00:42:51 +04:00
Cristian Ciupitu
0749112286 Micro-optimization: replace s.find(x)!=-1 with x in s
timeit shows a speedup of ~3x on Python 2.7.5 x86_64.
It also makes the code a bit shorter.
2014-03-16 13:10:28 -04:00
Lukáš Lalinský
95d102f5e4 Remove obsolete module development docs 2014-02-22 15:51:59 +01:00
willthames
e2d04f7e96 Allow hacking/env-setup module path to use config file library path
hacking/env-setup now adds the configured library path in ANSIBLE_CONFIG
to the ANSIBLE_LIBRARY environment variable in addition to the previous
default of ANSIBLE_HOME/library.

This replaces #5950.
2014-02-12 12:06:57 +10:00
Matt Martz
dbed05caec Support for -a to accept a file with test-module
If the CLI value for -a starts with an @, treat it like a file, and dump the contents into complex_args

This supports yaml or json.
2014-02-07 13:09:47 -06:00
jctanner
7fa0d8bdd3 Merge pull request #5461 from sivel/test-module-interpreter
Add -I/--interpreter argument to test-module
2014-01-29 16:24:37 -08:00
Michael DeHaan
3b8fd62ff9 More site rename things. 2014-01-28 20:29:42 -05:00
Michael DeHaan
c4a8a6d3c2 Add an "all" category so all modules show up uncategorized there. 2014-01-02 17:42:18 -05:00
Michael DeHaan
2f811c40d7 Basic docsite formatting fixups 2014-01-02 17:36:52 -05:00
Matt Martz
e50c2bccb8 Add -I/--interpreter argument to test-module 2013-12-30 14:53:32 -06:00
Mikhail Sobolev
84948292f3 include short_description in the module page's title 2013-12-26 14:35:57 -05:00
Michael DeHaan
83d298accc Add note about how to submit doc changes to generated module docs, limit TOC depth for module category list. 2013-12-25 21:29:54 -05:00
Mikhail Sobolev
fce90e0370 use rst formatting for sphinx part 2013-12-25 21:20:11 +02:00
Mikhail Sobolev
1713013dba provide sections and local TOC for module documentation 2013-12-25 21:19:00 +02:00
Mikhail Sobolev
7965d331f3 do not produce too deep toc for category lists 2013-12-25 21:19:00 +02:00
Mikhail Sobolev
af1f8db51d remove trailing whitespaces 2013-12-25 21:19:00 +02:00
Michael DeHaan
a5e8e10bb0 Removed unused things. 2013-12-25 14:17:47 -05:00
Michael DeHaan
f4aa6c53bd Format module requirements as notes in Sphinx 2013-12-25 14:12:00 -05:00
Michael DeHaan
eb0509fce7 Update the styling for the module pages slightly. 2013-12-25 14:06:55 -05:00
Michael DeHaan
35ec9f81ae Further modifications to the module formatter to adjust to the new theme, and some misc docs text corrections. 2013-12-25 13:24:29 -05:00
Michael DeHaan
fe2d00d9d3 WIP on refactoring the module formatter code that we use to build the doc site with. 2013-12-25 13:24:29 -05:00
Michael DeHaan
31d0060de8 Standardized on yml suffix, so fix this example content filename. 2013-12-25 13:24:29 -05:00
Michael DeHaan
10009b0d3f Starting to refactor module formatter script.
Rename "jpfunc" to something more explanatory
2013-12-25 13:24:29 -05:00
Jens Rantil
2096c669d9 env-setup fix for zsh <= 4.3.10
This fixes issue #5026. It used to work. The regression was
introduced in 2b3381de7c.
2013-12-04 14:36:47 +01:00
Michael DeHaan
40429ee64e Code to limit display of version_added attributions in modules for modules that are too old to call out this information.
This does not generically apply to new arguments added to existing modules, just the version_added attribute on the top level modules.
2013-11-27 21:34:00 -05:00
Michael DeHaan
51e6f411f2 Docs: Fix the module formatter code that is intended to remove the 'historical' variable from showing up in version_added information (RST) 2013-11-27 21:14:38 -05:00
phy1729
2b3381de7c Add zsh support for working dir independant sourcing 2013-11-19 13:35:01 -06:00
Michael DeHaan
f7c3975f21 Add version_added to all modules missing version_added information, the docs formatter will now
raise errors when omitted, updated changelog with new modules.
2013-11-18 18:55:49 -05:00
jctanner
b6c1574f5c Merge pull request #4765 from mvo5/bugfix/fix-man-template
Fixes in the man template
2013-11-06 08:20:27 -08:00
Michael Vogt
b8e641136a make comment lines in troff start with .\" and add a .SH EXAMPLES to the PLAINEXAMPLES section 2013-11-01 09:20:05 +01:00
Michael DeHaan
d34a26e307 Undo an inadvertant revert from template changes so we still allow pythonic imports in module land. 2013-10-31 16:53:05 -04:00
Alan Fairless
af40b19a2d Fix format string typo 2013-10-31 12:34:51 -05:00
James Tanner
d154bf8781 Revert templating enhancements from 73dbab70 e6c28658 d409352c 9858b1f2 4587528b 9b1fe455 214b0b05 8d3db803 7f9504d1 5031104c 35cb9dc2 2bd8cb57 1e85c754 2013-10-30 10:50:16 -04:00
Michael DeHaan
9858b1f2f3 Enable imports to work on a snippet based system, allowing for instance a library of common EC2 functions
to be reused between modules.  See library/system/service and library/system/ping for initial examples.  Can
work the old way to just import 'basic', or can import the new way to import multiple pieces of code from
module_utils/.
2013-10-26 11:09:30 -04:00
Jharrod LaFon
996f87d898 Fixed usage comment to fish syntax for sourcing a file 2013-08-14 15:52:37 -06:00
Jharrod LaFon
d0fe447fd1 Fixed incorrectly set PYTHONPATH 2013-08-14 10:46:58 -06:00
Jharrod LaFon
dbfcd78790 Added an env-setup file for Fish 2013-08-13 15:14:01 -06:00
Michael DeHaan
5f18a53530 Fixup docs formatting. 2013-08-06 10:53:56 -04:00
Michael DeHaan
303a8ff563 Fix module path in readme file. 2013-07-19 09:34:43 -04:00
Michael DeHaan
fa9635478b Fixing your YAML Seth :) 2013-07-15 13:16:37 -04:00
Michael DeHaan
955611bda8 Fixes #3294 2013-06-30 19:59:48 -04:00
Michael DeHaan
8b592c9d4b Add some whitespace to script 2013-06-30 19:21:28 -04:00
martin f. krafft
3839dcd56c Remove extra $ character
Signed-off-by: martin f. krafft <madduck@madduck.net>
2013-06-23 14:58:09 +02:00
martin f. krafft
bbbc214ffb Remove bashisms, replace with POSIX constructs
This replaces double conditional brackets with single ones and gets ris
of bashisms, so that the tool should be sourcable from any POSIX shell.

Constructs like [ $foo = "$bar"* ] yield filesystem-globbing behaviour
according to POSIX. A compliant way is to use case statements.

Signed-off-by: martin f. krafft <madduck@madduck.net>
2013-06-20 08:18:37 +02:00
martin f. krafft
9f4988dbfd Quote variables in shell script
In case paths contain spaces, it's better to consistently quote
variables, and to use $() instead of `` for external invocations.

Signed-off-by: martin f. krafft <madduck@madduck.net>
2013-06-20 08:18:37 +02:00
martin f. krafft
4b9f8fc294 Replace external command with shell construct
dirname/basename do not need an external process, shell variable
expansion can be made to do the same a bit faster.

Signed-off-by: martin f. krafft <madduck@madduck.net>
2013-06-20 08:18:11 +02:00
martin f. krafft
013cd38929 Remove shebang line
The env-setup script is not intended to be run directly, so it does not
need a shebang line, which might even create the wrong expectations.

Signed-off-by: martin f. krafft <madduck@madduck.net>
2013-06-20 08:18:11 +02:00
Michael DeHaan
3f8aa8aec5 Fix up some module docs formatting errors. 2013-06-19 22:37:09 -04:00
Michael DeHaan
b72109a04b Merge pull request #3273 from jlund/ansiblecc-to-ansibleworkscom
Update all ansible.cc references in the documentation to point to ansibleworks.com
2013-06-19 19:31:34 -07:00
Michael DeHaan
4553b3d0cf Merge branch 'generalise-hacking-dir-path-discovery' of git://github.com/madduck/ansible into envsetup2 2013-06-19 21:43:59 -04:00
Joshua Lund
0f81d1630f * Updated all ansible.cc references in the documentation to point
to ansibleworks.com
* Fixed a few misspelled words
2013-06-19 19:34:02 -06:00
Michael DeHaan
af9b510769 Merge pull request #3220 from dsedivec/devel
Improve Markdown (and other) module doc output
2013-06-16 19:50:48 -07:00
trbs
a4223e119d fixed x-bits in git 2013-06-16 22:22:16 -04:00
Dale Sedivec
7681b1ce68 Improve Markdown (and other) module doc output
- The html_ify filter now escapes HTML found in module documentation.
  THIS COULD AFFECT MORE THAN JUST MARKDOWN but I didn't see any modules
  expecting to use e.g. HTML entities or HTML tags in their
  documentation.

- The markdown_ify filter (used as jpfunc in markdown.j2) escapes at
  least a few Markdown in-line formatting characters.

- Improvements to markdown.j2:

    - Call jpfunc on the module name heading so that it gets escaped for
      Markdown (e.g. my_module_name becomes my\_module\_name).

    - Added paragraph breaks between paragraphs in the description.

    - Added examples heading, which is consistent with the notes heading
      below it.
2013-06-14 13:27:59 -05:00
martin f. krafft
3b008d6fa6 Expand usage synopsis
'source' is actually a "bashism" and the POSIX-way of sourcing a file
uses the single dot (which is arguably less readable). Both yield the
same result, and since the script may now also be sourced from
within the hacking directory, this commit expands the usage synopsis
accordingly.

Signed-off-by: martin f. krafft <madduck@madduck.net>

Conflicts:
	hacking/env-setup
2013-06-14 10:39:58 +02:00
martin f. krafft
581dea70d1 Generalise determination of hacking directory path
Bash needs a special case to determine the dirname of the sourced path
(the hacking dir), but in all other cases, using $0 allows the script to
be sourced also from within the hacking directory, not only from its
parent.

Signed-off-by: martin f. krafft <madduck@madduck.net>
2013-06-14 10:39:26 +02:00
Michael DeHaan
88102df07c Show 'yes' and 'no' in choices on docs page. 2013-06-01 12:33:11 -04:00
Nicolas Grilly
75ceb80572 Escape args injected in new style modules 2013-05-24 01:01:07 +02:00
Michael DeHaan
9ca0289dee Fixup the module formatter to explain the EXAMPLES string as well. 2013-05-11 16:32:22 -04:00
Jan-Piet Mens
eeb80c695f Add Requirements to rst template, ansible-doc
tweak position & look of Requirements in rst
tweak APT's notes as per anhj's wish
2013-05-11 16:46:59 +02:00
Michael DeHaan
ce67588dcf Fix module doc organization 2013-05-02 11:35:24 -04:00
Michael DeHaan
627b6a0455 Have 1.2 clear in docs 2013-05-02 11:31:51 -04:00
Michael DeHaan
391fb98ee2 Allow modules to be categorized, and also sort them when generating the documentation. 2013-04-28 15:03:45 -04:00
Michael DeHaan
af2fb56a10 Changes to allow WANT_JSON to allow JSON to non-Python modules 2013-04-24 22:00:40 -04:00
Michael DeHaan
bac3449db7 Restructure hacking readme. 2013-04-20 09:36:09 -04:00
Michael DeHaan
e2d9e1b5c2 Convert 'hacking' instructions to markdown, add more info. 2013-04-20 09:34:38 -04:00
Michael DeHaan
148d8859ba Docs on parameterized roles, make document generation output less noisy 2013-04-12 17:45:27 -04:00
Marco Vito Moscaritolo
a53259a797 Fixed option validation error
Fixed error on validation that block javascript documentation generation.
2013-03-29 16:30:33 +01:00
Michael DeHaan
b066e9c15c Remove authors file from version control (can still be built from 'make authors') 2013-03-25 23:36:53 -04:00
Cristian Ciupitu
29aaa5e693 module_formatter.return_data: use UTF-8 encoding
The text parameter can contain non-ASCII characters, so we'll encode it
using UTF-8. For example the DOCUMENTATION of the bzr module has such
characters in the name of the author.
2013-03-17 19:55:56 +02:00
Sam Kottler
86d420f481 Use verbose 'source' to make the document easier to read 2013-03-10 23:00:48 -04:00
Michael DeHaan
03db6ef24a Slightly more self-explanatory output for ./hacking/env-setup 2013-03-18 00:27:44 -04:00
Michael DeHaan
fa550f3d7e Adding a script to auto-generate an authors file, runnable from 'make authors', which is called from 'make docs/webdocs'. 2013-02-26 22:05:17 -05:00
Michael DeHaan
e51707711c Merge pull request #2120 from jpmens/doc_ex1
Add support for additional EXAMPLES string in Ansible modules
2013-02-23 08:58:34 -08:00
Yves Dorfsman
dfdc5bda4b Prevents PATH, PYTHONPATH etc... to be re-added. 2013-02-20 01:12:38 -07:00
Jan-Piet Mens
396a07bcc7 Add support for additional EXAMPLES string in Ansible modules
return DOC and EXAMPLES as a list
add moduledev explanation
more
2013-02-18 20:02:46 +01:00
Michael DeHaan
b3eb1f32e3 update hacking/test_module script to be aware of complex arguments, though it does not pass them. 2013-02-17 17:33:42 -05:00
Michael DeHaan
0ae7f996f5 Make sure all the lookup plugins are documented. 2013-02-02 11:51:25 -05:00
Les Aker
ee274b5816 fixed shebang in hacking test-module 2013-02-01 17:11:38 -05:00
junyoung
a2aacaaec8 whitespaces in FULL_PATH cause an error to get ANSIBLE_PATH 2013-01-28 10:46:34 +09:00
Daniel Hokka Zakrisson
a117944d0f Make env-setup work on Python 3 2013-01-23 19:48:13 +01:00
Blair Zajac
ec5f6ae246 hacking/env-setup: remove unused sys import. 2013-01-12 19:07:50 -08:00
Dag Wieers
66fb7fd9de Make use of yes/no booleans in playbooks
At the moment Ansible prefers yes/no for module booleans, however booleans in playbooks are still using True/False, rather than yes/no. This changes modifies boolean uses in playbooks (and man pages) to favor yes/no rather than True/False.

This change includes:

- Adaptation of documentation and examples to favor yes/no
- Modification to manpage output to favor yes/no (the docsite output already favors yes/no)
2012-12-14 11:56:53 +01:00
Jan-Piet Mens
f9755ca36d mail module: add MIME attachments, port and addresses with phrases
Add HTML-escaping to code examples in rST tempate of module-formatter
 Add support for specifying port, addresses with phrases and attaching files
 Add support for custom headers and document version_added for new options
 X-Mailer header added :)
 protect empty address lists & attachment list, and add bcc
2012-12-12 07:42:42 +01:00
Stephen Fromm
6a68d3813f Set LANG in module_common.py
Add constant DEFAULT_MODULE_LANG that defaults to C.  Can be set via
environment variable ANSIBLE_MODULE_LANG or configuration variable
module_lang.  Updated test-module to have same behavior.
2012-11-27 00:16:06 -08:00
Michael DeHaan
dd5a8474f8 Have module formatter ignore more types of files. 2012-11-26 18:50:26 -05:00
Jan-Piet Mens
068ef0e979 module_formatter: re-instate code 2012-11-22 07:23:10 +01:00
Jan-Piet Mens
caf003c813 DOCUMENTATION strings 2012-11-21 18:49:30 +01:00
Stephen Fromm
06e54c0b97 Add ability to specify syslog facility for modules
Update constants.py so that one can specify environmental variable
ANSIBLE_SYSLOG_FACILITY or syslog_facility in ansible.cfg to define
the syslog facility to use.  Alternatively, you can specify
ansible_syslog_facility in inventory.  Runner now replaces
the syslog facility in the openlog() call with the default or
the injected variables ansible_syslog_facility.

This also updates hacking/test-module to behave similarly.
2012-11-11 00:14:08 -08:00
Jan-Piet Mens
e32f4a0564 Move get_docstring from module_formatter into ansible/utils 2012-11-09 17:15:41 +01:00
Michael DeHaan
6a5df97393 Manpage documentation ALSO should be sorted 2012-11-03 18:54:38 -04:00
Michael DeHaan
626203a7c9 Module documentation should have options sorted 2012-11-03 18:52:59 -04:00
Jan-Piet Mens
afa467e975 DOCUMENTATION: LaTeX template is back
ongoing work for the Booklet
2012-10-24 19:42:52 +02:00
Michael DeHaan
4104478abd Added 'script', a module that can push and insantly run a remote script. Replaces the need to copy+command.
This is a bit of a rough draft, some error handling still needs to be added.
2012-10-20 12:12:07 -04:00
Michael DeHaan
896be48ac9 Merge pull request #1367 from jpmens/mdtempl
Add support for Github-flavored Markdown to module_formatter
2012-10-18 16:59:18 -07:00
Jan-Piet Mens
575459465e module_formatter: .rst now correctly handles code examples
- fixed template (it was the template), adding indentation with Jinja2
 - added description of code examples to man-page template (was missing)
 - fixed fireball, cron, and debug module examples to confrom
2012-10-18 13:49:19 +02:00
Jan-Piet Mens
d4f89122f4 Add support for Github-flavored Markdown to module_formatter
- Uses HTML tables and Github-flavored code blocks (3 backticks)
2012-10-18 07:34:17 +02:00
Stephen Fromm
60f06c36b3 Miscellaneous fixes to module_formatter.py
Try to autodetect MODULEDIR, instead of hardcoded path in jpmens
homedir.
Check if MODULEDIR exists; exit if it doesn't.
Rewrite boilerplate() to use DOCUMENTATION.yaml in examples/.  This
makes use of tbielawa's recent change that added this example file.
This also fixes -G so that it works.  boilerplate() was commented out
before.
2012-10-12 16:27:01 -07:00
Dag Wieers
2786149bdc Moving now from getopt to optparse
Let me know if we can move to another library instead ;-)
2012-10-11 18:14:38 +02:00
Michael DeHaan
6d2f003ceb Update formatter to not include orange blocks all over docsite page 2012-10-10 21:25:19 -04:00
Michael DeHaan
110244d7b4 Merge branch 'remove-argparse' of git://github.com/dagwieers/ansible into devel
Conflicts:
	hacking/module_formatter.py

Don't run webdocs build when building packages
2012-10-10 18:46:51 -04:00
Marco Vito Moscaritolo
ee679c0190 Unified document generator and make to generate JSON and JS files 2012-10-10 18:41:50 -04:00
Dag Wieers
2dcd0846ab Use getopt instead of argparse
On RHEL5 and RHEL6 there is not argparse, and 'make rpm' fails because of this.
With this change it works, and I can test and fix my own documentation...
2012-10-09 12:23:30 +02:00
Jan-Piet Mens
ba22ca13ba man pages have wrong chapter number 2012-10-05 09:09:49 +02:00
Michael DeHaan
c3f443f56c fix sorting 2012-10-04 07:08:13 -04:00
Michael DeHaan
761330b125 Fix module formatter indexing 2012-10-03 23:31:50 -04:00
Tim Bielawa
85fb7c6d4b Library functions and modules should be in the 3 man page section. Also the files should end in '.3' 2012-10-03 10:18:55 -04:00
Michael DeHaan
ad5433b166 include version added info for individual fields 2012-10-02 22:36:27 -04:00
Michael DeHaan
31a4fe412f Complain when modules do not have documentation. 2012-09-30 21:10:07 -04:00
Jan-Piet Mens
eb8a11237c module_formatter can output lists of files to process (.rst and .tex) 2012-09-30 19:07:40 +02:00
Jan-Piet Mens
e4338d0ca3 module_formatter now also uses Jinja2 trim_blocks
- Updated man template accordingly
- seem to have left in illegal char in facter DOCUMENTATION...
2012-09-30 15:06:18 +02:00
Jan-Piet Mens
f5e0fbf65b rst output template tweak for 'required' 2012-09-30 14:21:30 +02:00
Michael DeHaan
b96da3e5b0 Merge pull request #1158 from jpmens/man01
documentation: man template: support empty options; add Version
2012-09-30 05:00:39 -07:00
Jan-Piet Mens
61ee632d23 documentation: man template: support empty options; add Version to Makefile 2012-09-30 13:33:21 +02:00
Jan-Piet Mens
80a9016636 module docs: fixed rst template
- notes is now supported
- multiline code examples are now supported (HTML rendering was off)
2012-09-30 13:20:24 +02:00
Michael DeHaan
ce5dceab0e Merge pull request #1128 from mavimo/devel
Added documentation to APT module
2012-09-28 16:12:58 -07:00
Michael DeHaan
508e6ecf43 Merge pull request #1131 from jpmens/m-docs3
Module DOCUMENTATION for template, wait_for, and yum
2012-09-28 16:11:33 -07:00
Jan-Piet Mens
a040807fd0 Module DOCUMENTATION for template, wait_for, and yum 2012-09-29 00:49:02 +02:00
Marco Vito Moscaritolo
94de4db928 Add JSON output format to DOCUMENTS and EXAMPLES parser 2012-09-28 22:38:27 +02:00
Jan-Piet Mens
e0fb264a89 Module DOCUMENTATION: assemble, authorized_key, command, copy
plus a small fix in rst.j2 template
  manpages generated & checked
  modules.html generated & checked
2012-09-28 21:55:49 +02:00
Jan-Piet Mens
62d038dca4 module_formatter fixes 2012-09-28 09:59:43 +02:00
Michael DeHaan
0c855a85bc fix module formatter output messages 2012-09-27 21:34:28 -04:00
Michael DeHaan
405c097c43 Various fixes for the module documentation auto-generator 2012-09-27 21:30:32 -04:00
Michael DeHaan
83f277cfe6 Various tweaking to get the module formatter to work for 'make docs' in the docs project. Likely the templates for other module formatting types will have to change
by the time I'm done.
2012-09-27 21:06:31 -04:00
Jan-Piet Mens
d47e15a1f2 module_formatter in hacking/ 2012-09-26 20:41:44 +02:00
Michael DeHaan
ce01c3f7e7 Allow unicode transfer by not base64 encoding. Also: faster 2012-08-02 21:20:43 -04:00
Will Thames
4d4d0b90c5 readlink -f does not work on OS X. Replaced with a python solution 2012-07-30 21:35:24 +10:00
willthames
6219fc4932 env-setup no longer needs to be run from the ansible directory, it can be run from anywhere
env-setup now takes a -q argument to run in quiet mode
2012-07-30 13:18:28 +10:00
Michael DeHaan
738cea9c93 small tweaks to --help for hacking/test-module 2012-07-23 19:33:26 -04:00
Michael DeHaan
fc96b88205 Teach the test-module script about the new way MODULE_ARGS works in new-style modules. 2012-07-23 19:28:43 -04:00
bradobro
e8583833a7 test-module uses optparse with --debugger
Refactored hacking/test-module

1. uses optparse

2. has --debugger option

tested only with pdb on Python 2.7
2012-07-23 16:28:06 +00:00
bradobro
ade0233d57 Refactoring test-module to be more like ansible. 2012-07-23 16:04:28 +00:00
Michael DeHaan
d0f4358730 Port the copy module over to the new "common module" logic. 2012-07-21 17:07:42 -04:00
Michael DeHaan
a94ec130d2 Common module code upgrades 2012-07-17 23:09:57 -04:00
Michael DeHaan
9006d4557d Added code to allow insertion of boilerplate into modules to make them able to share lots of code, the result
should be a huge reduction of total ansible source, at a slight cost of difficulty in original module development.

We need to apply this now to all modules, but may need to have some exemptions to things like command, which should
subclass this module.
2012-07-17 22:34:52 -04:00
Michael DeHaan
867b2437cc consolidate output code in callbacks.py, from utils, remove extra functions 2012-07-15 10:12:49 -04:00
Peter Sankauskas
f9a14cfec1 Adding a missing '~' to use the user's home directory instead of the root file system for the module arguments 2012-05-02 09:50:20 -07:00
Michael DeHaan
6341361a5b Clarify that stderr WILL crash your module. Can't redirect because if we do we lose tracebacks
from modules remotely when they fail to parse, and this is VERY useful data.
2012-04-27 01:36:31 -04:00
Michael DeHaan
36e454c52f Because paramiko using a pty can't distinguish stderr and stdout, remove handling that
treated -D as a way to show stderr, and make sure modules don't include things on stderr.
Update docs and test module script to come into line.
2012-04-27 01:25:38 -04:00
Michael DeHaan
533c2c6126 Make it possible to use facts from hosts in templates for other hosts.
It works like this:

{{ hostvars['127.0.0.1']['ansible_eth0']['ipv4']['address'] }}
2012-04-21 12:45:37 -04:00
Tim Bielawa
e9e8417735 Update hacking with MANPATH. Correct hacking README details. 2012-04-17 10:53:32 -04:00
Michael DeHaan
82bd75c1e0 Update env-setup script to make it work better 2012-03-18 12:28:22 -04:00
Michael DeHaan
be55145a1e Initial crack at the file module 2012-03-15 21:53:14 -04:00
Michael DeHaan
a735dd2b17 Added the 'test-module' script, useful for testing modules without running them in Ansible. 2012-03-14 21:49:27 -04:00
Michael DeHaan
85e0de5bb2 Move print statements out of playbook.py and back into CLI so we can simplify playbook operations
independent of output, and can also see all the output nicely grouped together if we want
to reformat it or make summaries of statistics.
2012-03-06 19:24:36 -05:00
Tim Bielawa
c5f8bc9d79 Don't set ANSIBLE_HOSTS inside the env-setup script 2012-03-05 16:12:05 -05:00
Tim Bielawa
f2c2786a14 Update constants.py to pull module path and the hosts file from the
environment (ANSIBLE_{LIBRARY,HOSTS}) if defined.

Update manpages to represent this.

Also update the env-setup script to set ANSIBLE_{LIBRARY,HOSTS}.
2012-03-05 16:08:36 -05:00
Tim Bielawa
6343aa6214 Add environment updating script 'env-setup' to facilitate running ansible from a git checkout. 2012-03-05 13:47:01 -05:00