James Cammarata
458f71b53c
Merge branch 'issue_4129_role_defaults_empty_yaml' into devel
...
Conflicts:
lib/ansible/playbook/play.py
2013-09-16 16:21:06 -05:00
James Cammarata
091a90ee8b
Allow includes to follow the standard format
...
Previously, includes had to receive variables via a special 'vars'
field. With this patch, the include syntax becomes a more natural
datastructure without special fields and is more akin to the way
role includes/dependencies work.
Tested with the following playbook:
---
- hosts: localhost
connection: local
tasks:
- { include: inc1.yml, a: 1 }
- include: inc2.yml
b: 2
- include: inc3.yml
with_items:
- x
- y
- z
Fixes #3481
2013-09-16 16:12:36 -05:00
James Cammarata
c5bb1394b9
Check to make sure default_vars in the datastructure isn't empty
...
Fixes #4129
2013-09-16 13:16:06 -05:00
James Cammarata
5b15010099
Merge branch 'issue_3312_role_links' into devel
2013-09-16 09:29:25 -05:00
James Cammarata
3b801dec72
Merge branch 'failed_when' of https://github.com/hnakamur/ansible into hnakamur-failed_when
2013-09-16 07:35:34 -05:00
James Cammarata
fcc18fa105
Merge branch 'subelements' of https://github.com/sergevanginderachter/ansible into sergevanginderachter-subelements
2013-09-16 06:14:42 -05:00
James Cammarata
aac3090909
Merge branch 'play_remote_user' of https://github.com/bcoca/ansible into bcoca-play_remote_user
2013-09-16 05:55:14 -05:00
James Cammarata
3848e02959
Merge branch 'issue4022' of https://github.com/sfromm/ansible into sfromm-issue4022
...
Conflicts:
lib/ansible/runner/connection_plugins/accelerate.py
2013-09-16 05:50:35 -05:00
James Cammarata
d9cf1dfefb
Merge branch 'fetch' of https://github.com/bpennypacker/ansible into bpennypacker-fetch
2013-09-16 05:39:48 -05:00
James Cammarata
f4b3defcbf
Set sudo in accelerate commands correctly
...
Fixes #4111
2013-09-15 20:20:22 -05:00
Michael DeHaan
5c0dd958e5
Merge pull request #4028 from willthames/lineinfile_userdir
...
Expand tilde in paths in file module
2013-09-15 09:33:49 -07:00
Michael DeHaan
1f0eb32846
Update 1.4 specfile -- no need for node fireball package, release dates
2013-09-13 17:31:34 -04:00
James Cammarata
35d138a0d6
When checking conditionals, don't dereference when the variable contains dashes
...
Fixes #4104
2013-09-13 13:52:58 -05:00
James Cammarata
d0236f6ada
Check for link in path in utils.path_dwim_relative()
...
This allows an included path to be relative to a directory, if the
basedir of the original path is a symlink. In that case, the path
is normalized and the file is searched for in the normalized path.
Fixes #3312
2013-09-12 20:44:10 -05:00
Hiroaki Nakamura
2357194b39
Add failed_when module variable.
...
Implementation note: Ternery operator trick for python prior to 2.5 is used.
(test and [when_true_value] or [when_false_value])[0]
http://stackoverflow.com/questions/394809/ternary-conditional-operator-in-python#comment1466794_394887
2013-09-10 08:34:01 +09:00
Serge van Ginderachter
4f9af7efad
subelements lookup plugin
2013-09-09 23:45:55 +02:00
James Cammarata
75a9357e5e
Fixing role variable precedence for top-level roles
...
Fixes #4026
Fixes #3989
2013-09-09 15:14:03 -05:00
James Cammarata
294451d002
Correctly handle variable issues when evaluating jinja2 when statements
...
Fixes #4025
2013-09-09 14:50:21 -05:00
James Cammarata
bcc2a4b513
Minor fix so the any_errors_fatal value is checked properly
2013-09-09 10:20:41 -05:00
James Cammarata
4025695c00
Merge branch 'devel' of https://github.com/kavink/ansible into kavink-devel
2013-09-09 10:00:29 -05:00
Brian Coca
d47c48e30a
Added remote_user to plays
...
Still compatible with user: but deprecating it so we can have
a matching remote_user: in tasks, cannot be user: because of the
module of the same name. #3932
Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
2013-09-07 16:34:22 -04:00
Kavin Kankeshwar
c24f6f438b
Avoid ugly formatting due to a long if statement
2013-09-06 22:37:17 -07:00
James Cammarata
6e9fa5019f
Reverting HostVars change from a mapping back to a dictionary
2013-09-06 20:24:16 -05:00
James Laska
546788a1b6
The required package for selinux is libselinux-python
2013-09-06 16:26:48 -04:00
James Cammarata
4e9dee6093
Use StringIO to feed md5 calculation to prevent unicode issues
...
Fixes #4014
2013-09-06 09:11:47 -05:00
James Cammarata
2a47f72139
Merge pull request #4049 from mscherer/fix_no_kerberos
...
Fix no kerberos
2013-09-06 07:10:10 -07:00
Michael Scherer
f489702973
Also add back gssapi-keyex
...
While this is not currently implemented in openssh as far as I know,
there is patch floating around on the web and this may land one day
upstream.
2013-09-06 10:40:34 +02:00
Keiichi Mori
17c39b94a3
support GSSAPIAuth back
...
GSSAPIAuthentication has not been supported
due to PreferredAuthentications trick ( 2bdba17a85
)
2013-09-06 10:40:25 +02:00
James Cammarata
ae9e38daf8
Change hostvars to a mutable mapping to more closely resemble a dict
...
Fixes #4030
2013-09-05 23:04:16 -05:00
James Cammarata
2cbf28385a
Move check for accelerate mode deeper to account for ansible_connection
...
Fixes #4045
2013-09-05 20:20:25 -05:00
James Cammarata
20b0dc4abd
Check for an empty executable passed into the accelerate plugin
...
This was breaking at least the script module, so it would seem best
to check for it and set it to the default executable value
2013-09-05 15:11:26 -05:00
James Cammarata
4bf506f683
Always run the accelerate module as the user specified in the play
...
Currently, the accelerate daemon will be run as the sudo_user if
specified, which is incorrect.
2013-09-05 12:04:48 -05:00
Scott Sturdivant
68bffb1233
Don't force accelerate connection for local actions.
2013-09-05 09:37:47 -06:00
James Cammarata
f6e1bdabea
Ensure ports are set correctly in accelerate module
2013-09-05 09:52:10 -05:00
willthames
fe70ed94e3
Expand tilde in paths in file module
2013-09-05 16:28:26 +10:00
guersam
64db327411
Fix: raise correct error in accelerate mode
2013-09-05 15:10:45 +09:00
kavink
a075ec9831
Bug fix for a crash, when any_errors_fatal is true
...
Reported by Rumen:
TASK: [fail FAIL] *************************************************************
skipping: [hostname.com]
failed: [hostname.com] => {"failed": true}
msg: Failed as requested from task
Traceback (most recent call last):
File "/usr/local/bin/ansible-playbook", line 268, in <module>
sys.exit(main(sys.argv[1:]))
File "/usr/local/bin/ansible-playbook", line 208, in main
pb.run()
File "/Library/Python/2.7/site-packages/ansible/playbook/__init__.py", line 262, in run
if not self._run_play(play):
File "/Library/Python/2.7/site-packages/ansible/playbook/__init__.py", line 580, in _run_play
if (hosts_count - len(host_list)) > int((play.max_fail_pct)/100.0 * hosts_count):
TypeError: object of type 'NoneType' has no len()
2013-09-04 18:30:33 -07:00
Stephen Fromm
d704b55860
Support using paramiko to set up accelerate connection
...
Adds original_transport attribute to Runner to track what the original
transport was before it is changed to 'accelerate'.
If using paramiko in original_transport, uses ParamikoConnection. If
not, falls back to SSHConnection like before.
2013-09-04 13:57:03 -07:00
James Cammarata
fff497a1ae
Make sure the accelerated port is set to a sane value
2013-09-04 15:52:39 -05:00
James Cammarata
cc21e5c90c
Adding hostvars to injected variables in accelerate ssh runner
...
Also some minor cleanup of some fb* variables and functions, which
were remnants of the old fireball2 name
Fixes #4021
2013-09-04 15:29:46 -05:00
James Cammarata
7b13b1e03e
Minor fix to dependency dupe patch
2013-09-04 11:26:49 -05:00
James Cammarata
16258edd7a
Merge branch 'devel-duplicates2' of https://github.com/smoothify/ansible into smoothify-devel-duplicates2
2013-09-04 10:13:06 -05:00
James Cammarata
a202adcae1
Merge branch 'doublecallback' of https://github.com/sergevanginderachter/ansible into sergevanginderachter-doublecallback
2013-09-04 09:58:06 -05:00
smoothify
5337397abd
Second Attempt: Ensure duplicate roles are not loaded in the case of a missing meta/main.yml file.
2013-09-04 15:50:39 +01:00
James Cammarata
c0fecf87d1
Increase default socket timeout to 5 minutes
2013-09-04 09:47:40 -05:00
smoothify
0411ea2867
Ensure duplicate roles are not loaded in the case of a missing meta/main.yml file.
2013-09-04 12:38:42 +01:00
James Cammarata
2e49d2003d
Fix bug where accelerate keyword was not checked for boolean value
...
The play was just checking for the presence of the keyword in the
YAML datastructure, and not the value of the field, so doing something
like variable substitution was always causing the play to be accelerated
2013-09-03 14:20:56 -05:00
James Cammarata
2696135b3b
Display error during launch of accelerated daemon
...
* also minor tweak to the # of retries in the connection attempt
Fixes #4012
2013-09-03 12:28:32 -05:00
James Cammarata
7c1c9b3d10
Fix message in utils related to python-keyczar and fireball/acc mode
2013-09-03 11:16:50 -05:00
James Cammarata
53c2f4c1bb
Fix race condition on creating the temp directory for ControlPersist
...
Fixes #3943
2013-09-03 11:00:33 -05:00