Commit Graph

256 Commits (22ff8282a8277166c727b995f9e6e1d7e809d9bb)

Author SHA1 Message Date
Michael DeHaan 7b9856bc0e Modification on top of skvidal's common options patch to keep options to command line tools sorted. 13 years ago
Seth Vidal 7e50d170a8 move the bulk of the opt parsing out of ansible/ansible-playbook and into utils
for other scripts to use.
13 years ago
Jeroen Hoekx ab86726a15 Introduce per task variables and push them to templates. 13 years ago
Jeroen Hoekx edd5baad8b Refactor _transfer_argsfile to generic string transfer function. 13 years ago
Michael DeHaan 09e690fd7c Indentation error causing forks to not be parallel. Ahem :) 13 years ago
Michael DeHaan 778fe8755f Merge pull request #110 from jhoekx/remote-vars
Always add vars to a play.
13 years ago
Michael DeHaan eae1fdd734 Merge pull request #109 from jeckersb/version-0.0.2
Bump release to 0.0.2
13 years ago
Jeroen Hoekx e38ae18627 Always add vars to a play.
A play without vars section would fail to use variables given in an include. They would be added to the dict returned by play.get, but the dict would not be added to the play.
13 years ago
John Eckersberg 82b781925c pep8 fix 13 years ago
John Eckersberg 5aad4bacc7 Bump release to 0.0.2 13 years ago
Michael DeHaan e5d5b072db Merge remote branch 'public/integration' 13 years ago
Michael DeHaan 59a1ff31db Merge pull request #103 from jeckersb/no-shebang-on-callbacks.py
Remove shebang from callbacks.py
13 years ago
Michael DeHaan 2f1f0d44b4 Merge pull request #106 from mgwilliams/honor-hostfile-returncode
raise error if executable host file execution fails
13 years ago
Matthew Williams 461a4e78c2 raise error if executable host file execution fails 13 years ago
Matthew Williams c742b8eb0b bugfix for extra-vars 13 years ago
Seth Vidal bcef25f7eb add vars_prompt to playbooks
- this allows some vars to be prompted for at the start of the playbook
  setup
- defaults to no output since this would mostly be used for passwords
13 years ago
John Eckersberg 2dad8cc27c Remove shebang from callbacks.py
It is not +x, and has no __main__.  It draws ire of rpmlint.
13 years ago
Seth Vidal 04aecdcf34 before we run the actual module/command - emit what that would be to the logs 13 years ago
Michael DeHaan 2511992659 Surface module debug (-D) to /usr/bin/ansible also 13 years ago
Michael DeHaan 4a8dc50249 Merge pull request #97 from jhoekx/stderr-logging
Stderr logging
13 years ago
Jeroen Hoekx 74ae4b29ad Add a debug attribute to Runner/Playbook.
This prints the stderr of the executed modules on local stderr.
Most methods on Runner now return a fourth "err" parameter.
13 years ago
Jeroen Hoekx fb1a313974 Correct default user and port in playbook.
They are set in the constructor.
13 years ago
Michael DeHaan 6275e57718 pyflakes: Unused import / unused var 13 years ago
Michael DeHaan 9569be8bdb Need for quoting/unquoting problems go away once module_args are all treated as strings throughout. 13 years ago
Michael DeHaan 3ded27fe35 Treat module args as strings everywhere to avoid unneccessary shlex and requoting 13 years ago
Michael DeHaan f11de2f5c9 --extra-vars option for ansible-playbook
Conflicts:

	lib/ansible/playbook.py

Removed unneccessary shlex and replaced with basic split, some repurcussions in runner
that can be eliminated once we consistently pass args as a string (soon).
13 years ago
Michael DeHaan 6db87a5018 Minor style fix, update test to match quote fix patch 13 years ago
Matthew Williams ec6f488d1f shell quoting fixes
(edited author's original commit comment -- MPD)
13 years ago
Matthew Williams 99d5796605 support for quotes strings in command module (via posix=False), related fixes to keep other things from breaking 13 years ago
Michael DeHaan 2372a3b734 Sudo support operational in both playbooks and main program. Implementation could use some cleanup. 13 years ago
Michael DeHaan 81e3496037 Added preliminary support for --sudo to ansible, playbook support and further testing pending. 13 years ago
Michael DeHaan 72cc99722d sudo tweaks 13 years ago
Michael DeHaan 7ae75eb14b Default sudo is false 13 years ago
Michael DeHaan c2a6e2f97b Work in progress on sudo, hitting some issues with paramiko saying the connection is closed. 13 years ago
Michael DeHaan 7133734d87 Remove debug statements (WIP on sudo) 13 years ago
Michael DeHaan 4971101f27 Handler doesn't take this param. 13 years ago
Michael DeHaan 706ba9fd9a Add paramiko/pycrypto atfork workaround (can back out later if not useful), tweak error
message text per skvidal's suggestion
13 years ago
Michael DeHaan b30ddc4520 Expose remote_port option in playbook 13 years ago
Christopher Johnston 68818ad1fe add support for remote ports in playbooks 13 years ago
Christopher Johnston 15e781eb51 add exception check for paramiko if older then 1.7 13 years ago
Christopher Johnston f06ec76fdb add support for using an alternate remote port 13 years ago
Michael DeHaan b1471bf857 Add more comments to the callbacks file 13 years ago
Michael DeHaan 95670ce6b5 remove unused function 13 years ago
Michael DeHaan f9da7cb180 remove functions that are no longer used 13 years ago
Michael DeHaan 35d77d0433 Make it an error to try to hit a change handler that doesn't exist 13 years ago
Michael DeHaan f693759252 Style fixes from pep8 makefile target 13 years ago
Michael DeHaan f074f1c4c4 Fixes from pyflakes 13 years ago
Michael DeHaan 35c8750bbb Fix tree view to work with callbacks 13 years ago
Michael DeHaan 45a455a805 Make /usr/bin/ansible output realtime and also delete some code! 13 years ago
Michael DeHaan eb67a91c57 Merge remote branch 'public/master' 13 years ago
Michael DeHaan aaafd12b59 rm FIXMEs 13 years ago
Jeroen Hoekx a370261dce Playbook: create one task per include instead of per argument. 13 years ago
Michael DeHaan 6dda6f12dc Applying callback model to runner, and using that in playbooks, so output can be more immediate in playbooks.
(Runner still does not use callbacks for default output)
13 years ago
Michael DeHaan ab55fa4266 Revert "Only override the pattern if it is ommitted"
This reverts commit bb0bf9eef4.
13 years ago
Michael DeHaan bb0bf9eef4 Only override the pattern if it is ommitted 13 years ago
Michael DeHaan 9df612f007 Add a "-o" override option so hosts not in a playbook can still be managed by a playbook. 13 years ago
Michael DeHaan 292ac4aad2 Make it such that the 'name' element of each playbook line is optional. 13 years ago
Michael DeHaan 44d4dede92 Split conditional imports in playbook into subfunction, fix small bug in event reporting on playbook
actions.
13 years ago
Michael DeHaan b43019f3a1 In playbooks, a return code (rc) of non-zero should fail the playbook. 13 years ago
Michael DeHaan 6ab615c724 Code cleanup for playbooks, also added 'on_skipped' callback 13 years ago
Seth Vidal 53446d6d45 make sure the setup step in a playbook has the sshpass included 13 years ago
Seth Vidal 89d4bc542c fix up minor type - AnsibleException should be AnsibleError 13 years ago
Michael DeHaan a8c921cbcc Allow groups to be passed to runner API to make parse_hosts optional, misc fixes as a result of refactoring in Runner.
Cleanup in Playbooks module is next.
13 years ago
Michael DeHaan 94605b811b Fixes from refactoring 13 years ago
Michael DeHaan 6a7aac38c5 misc cleanup in the runner module, splitting some things out into utils, breaking up functions into smaller functions. 13 years ago
Michael DeHaan 7ed734dfb2 move callbacks to seperate file, anticipating callbacks for Runner() as well 13 years ago
Michael DeHaan 7883f414ce unused module 13 years ago
Michael DeHaan e6406fa5a7 Allow variable expressions to be stored as variables themselves, do some things to allow setup strings
to more easily contain spaces without being mangled, which is neccessary because of the above.
13 years ago
Michael DeHaan a5f4ca50b8 Ratchet up logging a few notches prior to controlling w/ verbosity settings 13 years ago
Michael DeHaan b5c62ec068 Enhance logging, way to gate verbosity levels pending. 13 years ago
Michael DeHaan dfbe591cc0 Add "only_if" capability, which allows task steps to be skipped if they do not match a conditional. 13 years ago
Michael DeHaan 149cc57b0f remove unneeded code 13 years ago
Michael DeHaan c05e7fd83e Fix typing issue 13 years ago
Michael DeHaan 4de7bbb169 Allow conditional imports, see examples/playbook3.yml comments for a full explanation. Extensive
refactoring of playbooks now warranted, which we'll do before we move on.   This variable assignment
system makes nearly all possible magic possible, for we can use these variables however we like,
even as module names!
13 years ago
Michael DeHaan 5ed2b894d9 Add an additional way to dereference a variable in a playbook, $foo
(Using varReplace function originally from yum, thanks Seth)
13 years ago
Michael DeHaan af9596307d Move templating into a utils function. Reuse is our friend. 13 years ago
Michael DeHaan c1fe0dd719 Quote long variables in playbooks when feeding them to the setup command 13 years ago
Michael DeHaan 5371a9e497 Regression tests for playbooks, logging the events they call via callbacks. 13 years ago
Michael DeHaan 45abe3c16b Add unit tests for playbooks, and fix an error caught by one 13 years ago
Michael DeHaan 9c5ec886a6 Import cleanup, plus have /bin/ansible remind you if no hosts were matched by a pattern (for instance, assume
there was a typo in the pattern)
13 years ago
Michael DeHaan 9e07b24239 Fix indentation 13 years ago
Michael DeHaan 6777268f4c Fixup the code that allows facter/ohai/other data to bubble up and be used in future action lines. It's a niche
case compared to usage in templates but it should work and will be wanted later for conditional support.
13 years ago
Michael DeHaan c861e0de55 Fix "import *" and resultant new things detectable from "make pyflakes" 13 years ago
Michael DeHaan 33aa50eae7 Inside of runner, do not 'import *' from utils, so we can more easily tell where functions come from 13 years ago
Michael DeHaan 9837a616eb Preserve changed data on file and template ops when the mode operations don't result in a change but the files
were still replaced.
13 years ago
Michael DeHaan 5905974737 Fix variable referenced before assignment when not using external variables script 13 years ago
Michael DeHaan 3495d402c7 Default for class variable 13 years ago
Michael DeHaan 9f6d98844e If the inventory file is EXECUTABLE, treat it as a file returning JSON, if called directly, return the host
and groups list.  If called with an argument of a host name, return the key=value data for that particular
host.
13 years ago
Michael DeHaan f39944b89b Update example to use correct service state; minor pep8 indent/spacing fixes 13 years ago
Michael DeHaan 24923c2e17 Purge unused imports per pyflakes 13 years ago
Michael DeHaan 63818000b4 auto call the file module after copy/template module usage in runner
note some changed=True/False detection bits in file module still need tweaking
13 years ago
Michael DeHaan be55145a1e Initial crack at the file module 13 years ago
Michael DeHaan 1a0672fd1e Fix exception type 13 years ago
Michael DeHaan c909b66864 use iteritems vs items(), probably doesn't matter that much 13 years ago
Michael DeHaan 4bde4926c3 Modules don't have to return JSON, key=value pairs is ok. 13 years ago
Michael DeHaan 40fd778e2c 'shell' is a magic module that executes the command module with shell=True 13 years ago
Michael DeHaan e8751baaf3 Remove remote log function as it's only used in one place now 13 years ago
Michael DeHaan 696b67f935 Fix async to use the new argfiles method (wrapping brain around rock, really must write module development guide) 13 years ago
Michael DeHaan 3ea9174ed7 Split argsfile handling into subfunction, attempt to apply argsfile logic to setup 13 years ago
Seth Vidal a9948f97c6 convert runner to use an args file rather than just arguments passed
on the command line
13 years ago