Commit Graph

76 Commits (e17a2b502d6601be53c60d7ba1c627df419460c9)

Author SHA1 Message Date
Toshio Kuratomi f34b55ac2b Add python3-compat boilerplate to all .py files in lib/ansible 2015-10-19 18:36:19 -07:00
James Cammarata c860775b5d Another fix for --limit in adhoc 2015-09-28 10:39:33 -04:00
James Cammarata babf47decb Clean up some bugs related to --limit on adhoc commands 2015-09-28 09:02:24 -04:00
James Cammarata e8e1d9f6fb Apply --limit to inventory in adhoc commands
Fixes #12473
2015-09-23 08:28:38 -04:00
James Cammarata ff9f5d7dc8 Starting to add additional unit tests for VariableManager
Required some rewiring in inventory code to make sure we're using
the DataLoader class for some data file operations, which makes mocking
them much easier.

Also identified two corner cases not currently handled by the code, related
to inventory variable sources and which one "wins". Also noticed we weren't
properly merging variables from multiple group/host_var file locations
(inventory directory vs. playbook directory locations) so fixed as well.
2015-09-04 16:41:38 -04:00
Brian Coca 154754ae50 pushed module_loader to task_queue_manager so all cli's can benefit from it
also normalized -M option across all cli
fixes #12016
2015-08-25 18:14:03 -04:00
Brian Coca 17b4b1f85c added ability to limit in ansilbe pull
refactored the options a bit, new inventory_opts made sense to always group
fixes #7917
2015-08-18 03:17:58 -04:00
Brian Coca 6058eaa92f removed unused poller 2015-08-16 20:12:06 -04:00
Brian Coca 9b61cf5840 implemented async tasks in adhoc v2 2015-08-16 20:05:10 -04:00
Brian Coca 4d853a5d3c implemented for v2, missing --tree option for adhoc 2015-08-11 19:18:10 -04:00
Abhijit Menon-Sen 8de70fa657 Disallow --forks 0
Without at least one worker process, things break:

Traceback (most recent call last):
  File "/home/ams/extern/ansible/ansible/lib/ansible/executor/process/result.py", line 103, in run
    result = self._read_worker_result()
  File "/home/ams/extern/ansible/ansible/lib/ansible/executor/process/result.py", line 69, in _read_worker_result
    (worker_prc, main_q, rslt_q) = self._workers[self._cur_worker]
IndexError: list index out of range
2015-08-02 14:10:45 +05:30
Brian Coca ced93d35ca adjusted list hosts across adhoc and playbook cli 2015-07-29 15:46:13 -04:00
Abhijit Menon-Sen 65d62090c2 A better error message for «ansible playbook.yml»
This is a very conservative change: we add the hint only if we're
definitely going to die already.
2015-07-27 12:43:21 +05:30
James Cammarata b8b206005c Generalize extra variable parsing and loading
Fixes #11352
2015-07-21 00:18:35 -04:00
Brian Coca 8ad52c2e4f readded oneline output feature to adhoc
fixes #11573
2015-07-13 15:43:31 -04:00
Brian Coca fe91f7b506 moved read_vault_file to CLI from utils and renamed to clearer read_vault_password_file 2015-07-11 14:24:45 -04:00
Brian Coca 51efd765be Merge pull request #11415 from msabramo/remove_unnecessary_imports
Remove unnecessary imports
2015-07-05 01:09:28 -04:00
Marc Abramowitz 0676157897 Remove unnecessary imports 2015-07-04 17:41:36 -07:00
Brian Coca 5f791329ce now verbose mode shows config file used 2015-07-04 10:23:49 -04:00
Matt Martz 1d55e193c1 Expose the TaskQueueManager to self 2015-06-15 13:50:40 -05:00
Matt Martz 670894e2bd Move building the play_ds into a method, that can be overridden 2015-06-15 10:35:26 -05:00
Brian Coca 24b7c353cc readjusted limit opts, makes no sense in adhoc when you already specify selection
changed pull to reflect this
2015-06-09 17:35:19 -04:00
Brian Coca 5aec5e5eb0 fixed ansible pull, reorged validate function for cli to be function specific like parser
added missing cmd_functions with run_cmd, mostly for ansible pull
2015-06-09 17:24:43 -04:00
Brian Coca b85ce38834 slight changes to error handling to align with v1 2015-05-13 11:15:32 -04:00
James Cammarata 8db21f99b7 Set the inventory on the variable manager for the adhoc cli usage (v2) 2015-05-07 12:53:59 -05:00
James Cammarata ce3ef7f4c1 Making the switch to v2 2015-05-03 21:47:26 -05:00