jctanner
21b4212ff5
Merge pull request #5517 from lichesser/fix_set_depreciation_warning
...
Fixes #5513 . set is built-in since 2.4 and deprecated since 2.6
2014-01-07 15:48:27 -05:00
jctanner
83dec044ab
Merge pull request #5504 from smoothify/synchronize-sudo
...
Synchronize Module: Improved sudo override behaviour.
2014-01-06 14:52:59 -08:00
jctanner
9a69b1b0ec
Merge pull request #5311 from willthames/ec2_refactor
...
ec2 modules: Move more responsibility to common EC2 module
2014-01-06 14:09:38 -08:00
James Tanner
d6b78e9dd6
Fixes #5238 Improve error messaging about unquoted variable references in playbooks
2014-01-06 16:47:19 -05:00
James Tanner
ab51bd23a2
Fixes #5196 return a unique list of hostnames for a single host pattern
2014-01-06 14:19:20 -05:00
smoothify
93a55e8dff
Don't override sudo if transport is set to local.
...
https://github.com/ansible/ansible/pull/5251
2014-01-04 23:32:25 +00:00
Michael DeHaan
c039e276a2
Fact gathering on a second play against the same hosts should not be implicitly off since this is an undocumented beheavior and potentially
...
rather unwanted when a play could change a fact.
gather_facts: True/False can still be explicitly used per play.
Reverts 564a212b3c
2014-01-04 14:03:58 -05:00
Michael DeHaan
87258f6d42
Resolve merge commit
2014-01-04 14:03:42 -05:00
Michael DeHaan
1c632af2c9
Merge pull request #5468 from jeromew/ansible_ssh_alt
...
fix issue #5372 on ssh_alt: accept -K option for a user with NOPASSWD
2014-01-04 10:55:58 -08:00
Michael DeHaan
a3d90e8a87
Merge pull request #5498 from j2sol/exit_setup_early
...
Return early from setup step when possible
2014-01-04 10:47:35 -08:00
Michael DeHaan
227e8e31c9
Merge branch 'use_comps' of git://github.com/j2sol/ansible into devel
2014-01-04 13:36:40 -05:00
Michael DeHaan
10350d1639
Update various copyrights. Not complete, but sufficient.
2014-01-04 13:32:04 -05:00
Jesse Keating
23720ff19d
Use list comprehensions for efficiency
...
For loops can be inefficient, particularly when doing a dot command with
them. https://wiki.python.org/moin/PythonSpeed/PerformanceTips#Loops and
https://wiki.python.org/moin/PythonSpeed/PerformanceTips#Avoiding_dots ...
This patch makes use of list comprehensions to be as efficient as
possible while still retaining order. Efficiency was lost a bit when
switching away from sets() but this gains some of it back.
2014-01-03 18:07:00 -08:00
Jesse Keating
35328ed503
Return early from setup step when possible
...
The _list_available_hosts call can be lengthy, and in the case where
gather_facts is disabled the call is pointless. So re-arrange the logic
to return early from _do_setup_step when gather_facts is false.
2014-01-03 16:39:13 -08:00
Michael DeHaan
c41a23a35a
Complete removal/refactoring of conditional deprecations.
2014-01-03 19:23:19 -05:00
Michael DeHaan
8e5b7d3095
Remove code underlying when_* and only_if, which are deprecated features slated for removal in the 1.5 release.
2014-01-03 19:13:21 -05:00
Michael DeHaan
28b9fd4e30
We have had only_if, when_foo, etc, deprecated for a while and said they would be removed in 1.5. Now they are, with friendly error messages still.
...
Users of these features should use "when:" as documented at docs.ansible.com.
Similarly, include + with_items has been removed. The solution is to loop
inside the task files, see with_nested / with_together, etc.
2014-01-03 13:47:54 -05:00
James Tanner
21fdb2bbc7
Fixes #5200 Handle template contents with unicode strings better
2014-01-03 11:18:20 -05:00
James Tanner
fc473b3246
Fixes #5146 Handle missing stdin when running under celery with rabbitmq or redis
2014-01-03 09:46:16 -05:00
Michael DeHaan
de2ffc1276
Don't need to document these guys.
2014-01-02 17:55:59 -05:00
James Tanner
cb2214d6f8
Fixes #4935 Synchronize module: set destination to an fqdn if connection is not local, and abide by ansible_remote_user
2014-01-02 14:58:12 -05:00
jctanner
99560e3902
Merge pull request #5047 from sergevanginderachter/synch_template_ansiblesshhost
...
synchronize: allow ansible_ssh_host to be templated
2014-01-02 09:05:14 -08:00
jeromew
b2cd4a62de
fix issue #5372 on ssh_alt: accept -K option even for a user with NOPASSWD
2013-12-31 14:29:46 -05:00
Levi Gross
dc6a26123b
Fixed syntax error and removed unused imports
2013-12-25 11:04:47 -05:00
Michael DeHaan
643690ffec
Remove depedency of lookup plugin on setting in ansible.cfg
2013-12-21 08:49:08 -05:00
Michael DeHaan
5b3c796641
Update constants.py
...
Lookup plugins for optional web services do not warrant advertising in ansible.cfg.
2013-12-21 08:46:11 -05:00
Stephen Fromm
833e1f6e2a
Make sure action plugin copy cleans up tmp dir
...
The copy action plugin creates its own tmp dir for each file that it
copies to the target machine. However, it does not clean up the
original tmp path it was given when run() is called. This cleans up the
tmp path before it begins looping on source files.
2013-12-20 14:58:34 -08:00
James Tanner
993e0f057e
Allow for no role dependencies in role metadata
2013-12-19 14:19:14 -05:00
James Tanner
1ef9930b80
Addresses #5341 Expand home directories when searching for roles in ansible-playbook
2013-12-18 23:31:03 -05:00
James Tanner
5d022182fe
Fixes #5341 Use constants.py to set the roles directory
2013-12-18 22:40:58 -05:00
jctanner
ea8cd62b19
Merge pull request #5259 from mvo5/bugfix/improve-error-on-invalid-vars-file
...
improve error on invalid vars file (if its a list instead of a dict)
2013-12-17 11:12:53 -08:00
jeromew
e4a3f49fa2
ssh_alt - only trigger 'fatal' when returncode == 255 (interpreted as 'could no connect')
2013-12-17 11:42:00 -05:00
willthames
12005a1cd0
Move more responsibility to common EC2 module
...
Moved `AWS_REGIONS` into `ec2` module
Created `ec2_connect` method in `ec2` module
Updated modules able to use `ec2_connect` and `AWS_REGIONS`
2013-12-17 14:07:24 +10:00
jctanner
cd3144af5d
Merge pull request #5178 from cavassin/devel
...
Prevents UnicodeEncodeError
2013-12-16 13:23:16 -08:00
James Tanner
f3a4705a9c
Revert "Merge pull request #4874 from leth/editable_install"
...
This reverts commit 15b89b45e1
, reversing
changes made to 3d836a1ab7
.
2013-12-16 15:57:03 -05:00
jctanner
15b89b45e1
Merge pull request #4874 from leth/editable_install
...
Fix setup.py to work with 'pip install -e .'
2013-12-16 11:22:45 -08:00
jctanner
3d836a1ab7
Merge pull request #5247 from jeromew/ansible_ssh_alt
...
ssh_alt.py / decrease # of ssh roundtrips
2013-12-16 07:08:35 -08:00
jeromew
5c965a75f0
ssh_alt.py / decrease # of ssh roundtrips
2013-12-13 14:23:40 -05:00
jctanner
1679d83637
Merge pull request #5131 from janeznemanic/devel
...
Fix for issue #4730 - stacktrace when deferenencing a non-existent group
2013-12-13 11:00:41 -08:00
jctanner
301a1189dd
Merge pull request #5122 from willthames/openlog_str
...
Make first argument to syslog.openlog be a string
2013-12-13 08:51:48 -08:00
Ferenc Grecu
56642f9b04
Remove unused parameter from _get_config
2013-12-12 18:48:02 +02:00
Michael Vogt
bef5ee2c3b
improve error on invalid vars file (if its a list instead of a dict)
2013-12-12 09:56:30 +01:00
Jesse Keating
8cef210aea
Make sure ssh pipes are empty before moving on
...
Resolves issue #5082
Code as it was would hit a scenario where one of the FDs was not ready for
reading the first time through -- but p.poll() would show the process as
complete. This would cause ansible to continue on, while leaving some content
left in a pipe.
The other scenario -- the one that causes the unclosed quote, is if we go
through select.select() and we do get stdout in the ready for reading -- we
read from it (9000 bytes), but that's not all that is there. Again we'd get to
the p.poll() check and it would be indeed not none, but we would have left some
of stdout on the FD and thus the json blob would be malformed.
Tested with and without full ssh debugging.
Tested with and without ControlPersist
Tested with and without ControlPersist sockets already created
2013-12-11 21:32:37 -08:00
Michael DeHaan
929f8a5c93
Had to revert commits due to async.
2013-12-10 19:24:08 -05:00
Michael DeHaan
74e4ccb59b
Revert "ssh_alt.py / decrease # of ssh roundtrips"
...
This reverts commit 7f8863f96d
.
2013-12-10 19:23:52 -05:00
jeromew
7f8863f96d
ssh_alt.py / decrease # of ssh roundtrips
2013-12-10 06:00:21 -05:00
jeromew
db182ba498
copy ssh.py to ssh_alt.py
2013-12-09 14:11:29 -05:00
Steve Smith
5b81f88c8f
Cast the retrieved retries
var to an int before incrementing as it may be in string form.
...
For example, the following method of calculating the value will result in a type error:
appstatus_waitfor: 4 # Minutes
appstatus_delay: 5 # seconds
appstatus_retries: "{{ mins * 60 / delay }}"
2013-12-07 10:35:14 +01:00
Wanderlei Antonio Cavassin
6ba93817a9
Avoid UnicodeDecodeError exception when passing module args
2013-12-06 12:59:43 -02:00
James Tanner
bf78d8cf73
Addresses #5090 setup module was using path.is_file instead of path.isfile
2013-12-05 11:36:54 -05:00