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
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
cavassin
10f5af82f9
Prevent UnicodeEncodeError
...
Prevents UnicodeEncodeError: 'ascii' codec can't encode character, while printing shell commands output
2013-12-05 13:17:57 -02:00
jctanner
7aa35d64c2
Merge pull request #5091 from EspadaV8/5089_assemble_fix
...
#5089 hack-fix assemble module
2013-12-04 10:13:16 -08:00
Michael DeHaan
801ca96a8b
Merge pull request #5152 from sivel/too-many-ps
...
The word skipped only has 2 p's not 3
2013-12-03 16:21:11 -08:00
Matt Martz
5f0f3566a6
Skipped only has 2 p's not 3
2013-12-03 15:42:34 -06:00
Matt Martz
8873c3675b
Ensure we are looking for the right import to determine if the module_style is new. Fixes #5148
2013-12-03 15:36:33 -06:00
jctanner
2670529671
Merge pull request #5090 from dragon3/hostname_support_amazon_linux
...
hostname module: add support for Amazon Linux
2013-12-03 12:34:55 -08:00
James Tanner
d227614529
Fixes #5109 synchronize module ssh port
...
Added a parameter for dest_port and also check ansible_ssh_port inventory variable.
2013-12-03 14:48:20 -05:00