Commit Graph

100 Commits (2659c3872005a6ae666407e0f795b1e8b6246e2e)

Author SHA1 Message Date
Michael DeHaan 3f26a1c7f6 verbose option is not being used, so remove it. debug variable still exists. 2012-04-16 23:47:41 -04:00
Michael DeHaan 78b5cd64d0 Add pydoc for constructors. Some arguments can be trimmed as we plan to remove the need for them (like setup_cache and
maybe module_vars) with various pending refactoring.
2012-04-16 23:45:15 -04:00
Michael DeHaan 9ce27be878 Remove extra_vars tests 2012-04-16 23:03:04 -04:00
Michael DeHaan 35fdf6636b Allow --user for playbooks, no need for port setting as can specify in inventory file now. 2012-04-16 22:15:55 -04:00
Michael DeHaan 08468dcb0c Fixes to make ports DWIM. 2012-04-16 21:52:15 -04:00
Michael DeHaan 957867e088 Merge branch 'yaml-inventory' of https://github.com/jhoekx/ansible into jhoekx-yaml-inventory
Conflicts:
	lib/ansible/runner.py
2012-04-16 21:14:44 -04:00
Jeroen Hoekx c5cae87eca Refactor inventory code out of Runner.
This introduces the Inventory class.

Playbook uses the internals of Runner to limit the number of hosts to poll
asynchronously. To accomodate this, Inventory can be restricted to specific
hosts.
2012-04-16 09:16:28 +02:00
Michael DeHaan 3454fa9950 As part of the support for access to external nodes information, save fact data into /var/lib/ansible/setup_data
OR a per-user directory when running from playbooks.  Technically this info is also available via the SETUP_CACHE
but that is a bit more complex of a construct and it would be better to not cross the streams.
2012-04-14 11:58:08 -04:00
Michael DeHaan 31d4ee32d1 Looping! With items! See examples/playbook/loop_with_items.yml for details 2012-04-14 09:55:24 -04:00
Michael DeHaan f2465e0571 Add support for specifying sudo passwords to both ansible & playbook. Nopasswd sudo is no longer required. 2012-04-13 19:06:11 -04:00
Stephen Fromm 0675f2511b Merge branch 'master' into localconnection
Merge the SortedOptParser bits and debug attribute commits into
localconnection.

Conflicts:
	bin/ansible
	lib/ansible/playbook.py
	lib/ansible/runner.py
	lib/ansible/utils.py
2012-04-12 11:18:35 -07:00
Stephen Fromm 40fc9a3249 Update playbook to be transport aware
This adds transport variable to playbook.py.  It can be set with
'connection' in the playbook file.
2012-04-11 09:39:04 -07:00
Michael DeHaan 1d75a29ec9 Allow variables coming in from the playbook and the API to be expressed as dictionaries throughout their full life cycle
such that nested data can be made available in templates and playbooks.
2012-04-10 20:58:40 -04:00
Jeroen Hoekx ab86726a15 Introduce per task variables and push them to templates. 2012-04-04 13:39:03 +02:00
Michael DeHaan 778fe8755f Merge pull request #110 from jhoekx/remote-vars
Always add vars to a play.
2012-04-03 17:07:00 -07:00
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.
2012-04-03 17:35:05 +02:00
John Eckersberg 82b781925c pep8 fix 2012-04-03 09:58:00 -04:00
Michael DeHaan e5d5b072db Merge remote branch 'public/integration' 2012-04-02 20:02:46 -04:00
Matthew Williams c742b8eb0b bugfix for extra-vars 2012-04-02 14:57:37 -07:00
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
2012-04-02 17:46:02 -04:00
Michael DeHaan 4a8dc50249 Merge pull request #97 from jhoekx/stderr-logging
Stderr logging
2012-03-31 08:01:48 -07:00
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.
2012-03-31 09:32:13 +02:00
Jeroen Hoekx fb1a313974 Correct default user and port in playbook.
They are set in the constructor.
2012-03-31 09:11:07 +02:00
Michael DeHaan 3ded27fe35 Treat module args as strings everywhere to avoid unneccessary shlex and requoting 2012-03-30 22:47:58 -04:00
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).
2012-03-30 22:29:06 -04:00
Matthew Williams ec6f488d1f shell quoting fixes
(edited author's original commit comment -- MPD)
2012-03-30 21:57:33 -04:00
Matthew Williams 99d5796605 support for quotes strings in command module (via posix=False), related fixes to keep other things from breaking 2012-03-30 21:57:33 -04:00
Michael DeHaan 2372a3b734 Sudo support operational in both playbooks and main program. Implementation could use some cleanup. 2012-03-29 22:59:29 -04:00
Michael DeHaan 4971101f27 Handler doesn't take this param. 2012-03-28 20:33:44 -04:00
Michael DeHaan b30ddc4520 Expose remote_port option in playbook 2012-03-28 19:31:17 -04:00
Christopher Johnston 68818ad1fe add support for remote ports in playbooks 2012-03-28 15:02:50 -07:00
Christopher Johnston f06ec76fdb add support for using an alternate remote port 2012-03-28 14:05:31 -07:00
Michael DeHaan 95670ce6b5 remove unused function 2012-03-26 21:58:28 -04:00
Michael DeHaan 35d77d0433 Make it an error to try to hit a change handler that doesn't exist 2012-03-26 21:31:48 -04:00
Michael DeHaan eb67a91c57 Merge remote branch 'public/master' 2012-03-26 19:36:03 -04:00
Michael DeHaan aaafd12b59 rm FIXMEs 2012-03-26 19:35:53 -04:00
Jeroen Hoekx a370261dce Playbook: create one task per include instead of per argument. 2012-03-26 10:30:48 +02:00
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)
2012-03-25 19:05:27 -04:00
Michael DeHaan ab55fa4266 Revert "Only override the pattern if it is ommitted"
This reverts commit bb0bf9eef4.
2012-03-24 16:21:44 -04:00
Michael DeHaan bb0bf9eef4 Only override the pattern if it is ommitted 2012-03-24 16:20:47 -04:00
Michael DeHaan 9df612f007 Add a "-o" override option so hosts not in a playbook can still be managed by a playbook. 2012-03-24 16:19:38 -04:00
Michael DeHaan 292ac4aad2 Make it such that the 'name' element of each playbook line is optional. 2012-03-23 21:06:54 -04:00
Michael DeHaan 44d4dede92 Split conditional imports in playbook into subfunction, fix small bug in event reporting on playbook
actions.
2012-03-23 21:03:25 -04:00
Michael DeHaan b43019f3a1 In playbooks, a return code (rc) of non-zero should fail the playbook. 2012-03-23 20:53:57 -04:00
Michael DeHaan 6ab615c724 Code cleanup for playbooks, also added 'on_skipped' callback 2012-03-23 20:51:26 -04:00
Seth Vidal 53446d6d45 make sure the setup step in a playbook has the sshpass included 2012-03-23 16:41:44 -04:00
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.
2012-03-22 00:30:05 -04:00
Michael DeHaan 6a7aac38c5 misc cleanup in the runner module, splitting some things out into utils, breaking up functions into smaller functions. 2012-03-21 23:39:09 -04:00
Michael DeHaan b5c62ec068 Enhance logging, way to gate verbosity levels pending. 2012-03-20 21:44:01 -04:00
Michael DeHaan dfbe591cc0 Add "only_if" capability, which allows task steps to be skipped if they do not match a conditional. 2012-03-20 19:55:04 -04:00