James Cammarata
f162990cb3
Properly assign the searchpath for templates to the environment loader
...
dbd755e0
previously assigned the value to self._templar.environment.searchpath,
which is incorrect - it needs to be assigned to the environment.loader.searchpath
value instead.
Fixes #11931
2015-09-01 17:33:14 -04:00
James Cammarata
d00c445d2c
Merge pull request #12188 from amenonsen/easy-debug
...
Show module name and args with -vvv
2015-09-01 14:15:15 -04:00
Abhijit Menon-Sen
d6d523bcae
Show module name and args with -vvv
...
This information was earlier shown only with ANSIBLE_DEBUG, but it's
extremely useful in a user context, especially with module invocations
with deeply nested args like the ec2_vpc/ec2 modules.
Closes #11680
2015-09-01 23:44:13 +05:30
James Cammarata
974b69d236
looped includes need unique references to prevent information bleeding
...
Fixes #12155
2015-09-01 12:32:35 -04:00
Brian Coca
7458331539
package and service now check that module exists before trying to execute it
2015-08-31 20:34:20 -04:00
James Cammarata
fca27c29f4
Properly fail if slurp fails during fetch
2015-08-31 16:45:03 -04:00
James Cammarata
66a2f2923e
Look for proper values in slurp result during fetch with become enabled
2015-08-31 16:36:07 -04:00
Brian Coca
6b73cac35a
corrected skipped_hosts constant usage, thanks @benjixx
2015-08-30 20:21:15 -04:00
Brian Coca
5a65dce6fb
fix issues with csh redirection
2015-08-30 17:49:16 -04:00
Brian Coca
6154ed1dda
Merge pull request #12146 from thekarlbrown/patch-1
...
Fixed Spelling Error on Line 67
2015-08-28 20:10:47 -04:00
James Cammarata
f0257683b0
Fixed missing constants import in default callback
...
Fixes #12145
2015-08-28 16:54:56 -04:00
James Cammarata
057712c129
Also move action/connection plugins to shared plugin loader code
...
Fixes #12099
2015-08-28 16:32:09 -04:00
Karl Brown
9aae1d5810
Fixed Spelling Error on Line 67
...
Noticed while running Ansible from Tip.
Throws: NameError: global name 'tself' is not defined
2015-08-28 15:45:49 -04:00
Brian Coca
b6c6ed91fe
implemented not showing skipped hosts config
2015-08-28 12:32:50 -04:00
James Cammarata
66ed397360
Fix redis fact_caching_timeout=0 bug
...
Fixes #12018
2015-08-28 11:47:06 -04:00
James Cammarata
5a5b9f211b
Validate variable names when loading 'vars:' blocks
...
TODO: add this to VariableManager to validate vars loaded from files too
Fixes #12022
2015-08-28 11:36:31 -04:00
Marius Gedminas
df1b41d3d3
Avoid types.NoneType
...
types.NoneType was removed in Python 3.
None is a singleton in Python, so 'x is None' is equivalent to
'isinstance(x, NoneType)'.
2015-08-27 22:15:56 +03:00
Marius Gedminas
39196ec91e
Drop the L suffix on numerical constants
...
Python has had automatic int-to-long promotion for a long long time now.
Even Python 2.4 does that automatically.
Python 3 drops support for the L suffix altogether.
2015-08-27 22:15:04 +03:00
Marius Gedminas
0eb538df03
Use 0oNNN octal syntax
...
This syntax is valid in Python 2.6+ and 3.x.
2015-08-27 22:15:04 +03:00
Marius Gedminas
0c6ce31f76
Use 'except ... as' syntax
...
This syntax works on Python 2.6 through 3.x. lib/ansible/module_utils
(and lib/ansible/modules) need to support Python 2.4, so I didn't touch
those.
2015-08-27 22:15:04 +03:00
Abhijit Menon-Sen
b328bc023d
Add a combine filter with documentation
...
This is based on some code from (closed) PR #7872 , but reworked based on
suggestions by @abadger and the other core team members.
Closes #7872 by @darkk (hash_merge/hash_replace filters)
Closes #11153 by @telbizov (merged_dicts lookup plugin)
2015-08-27 23:29:12 +05:30
Brian Coca
b2bfe3502b
make sure delimiter is basestring for cvsfile
...
fixes #12062
2015-08-26 18:38:39 -04:00
James Cammarata
0441a7a217
Finishing off porting of chroot connection plugin
2015-08-26 16:43:06 -04:00
Toshio Kuratomi
017bd7b1cd
Fix synchronize lookup of localhost info
2015-08-26 13:36:50 -07:00
Thomas Quenolle
c948af3b1e
Synchronize fix error
...
Fix the error:
"RuntimeError: dictionary changed size during iteration"
2015-08-26 11:01:00 +02:00
James Cammarata
601a1cc6d9
Multiple fixes for include statements and blocks in general
...
Fixes #11981
Fixes #11995
Fixes #12039
Fixes #12077
2015-08-26 02:23:22 -04:00
Toshio Kuratomi
56ae3a032f
Merge pull request #12075 from ansible/fix-vault-unicode
...
Unicode and other fixes for vault
2015-08-25 14:49:15 -07:00
Toshio Kuratomi
a3fd4817ef
Unicode and other fixes for vault
2015-08-25 12:43:09 -07:00
Toshio Kuratomi
156feec264
Merge pull request #11650 from objectified/feature-docker-connection
...
allow ansible to connect to docker containers (without using ssh)
2015-08-25 09:28:25 -07:00
Brian Coca
ae91cdfc98
fixed environment inheritance
2015-08-25 10:15:32 -04:00
objectified
b1785a0361
replace compare_versions() with distutils.version
2015-08-25 02:18:37 -04:00
objectified
c39fb43ad9
added Maintainer comment header
2015-08-25 02:06:01 -04:00
Brian Coca
17060f9849
remove +1 from size that was cutting off first char of copied files when a recursive dir
...
fixes #12055
2015-08-24 21:10:03 -04:00
objectified
d9723069c5
align exec_command() definition with local.py
2015-08-24 12:32:11 -04:00
objectified
3a5522a22c
fake being connected for logging purposes
2015-08-24 12:32:11 -04:00
objectified
8f2a6a9fae
use docker cp when docker >=1.8.0
2015-08-24 12:32:11 -04:00
objectified
2de773477f
allow ansible to connect to docker containers
2015-08-24 12:32:11 -04:00
James Cammarata
db65503778
Revert "Add PowerShell exception handling and turn on strict mode."
2015-08-23 21:09:16 -04:00
Brian Coca
3ccfebc9f7
Merge pull request #12047 from cchurch/powershell_common_cleanup
...
Add PowerShell exception handling and turn on strict mode.
2015-08-23 14:08:18 -04:00
Abhijit Menon-Sen
09e4eac2e5
Use rsplit(':',1) for clarity; no functional changes
2015-08-23 22:52:35 +05:30
Ryan Petrello
1886307845
Fix a parsing bug that prevents IPv6 addresses from being used with `add_host`
...
Closes #8682
2015-08-23 22:50:47 +05:30
Chris Church
4b2cdadc98
Add PowerShell exception handling and turn on strict mode.
...
* Add exception handling when running PowerShell modules to provide exception message and stack trace.
* Enable strict mode for all PowerShell modules and internal commands.
* Update common PowerShell code to fix strict mode errors.
* Fix an issue with Set-Attr where it would not replace an existing property if already set.
* Add tests for exception handling using modified win_ping modules.
2015-08-22 18:28:07 -04:00
Brian Coca
47d9e7ca93
Merge pull request #11984 from Alphadelta14/devel
...
Support any Mapping for with_dict lookup.
2015-08-22 12:39:42 -04:00
Brian Coca
f150fe2c23
moved mandatory back to filters as it does not always return a boolean, it does an exception on failure
2015-08-21 09:54:56 -04:00
Brian Coca
2787b3acac
ported consul_kv lookup from v1
2015-08-21 00:22:20 -04:00
Brian Coca
74079db8d2
ported dig lookup from v1
2015-08-21 00:22:01 -04:00
Brian Coca
9bb95b5235
Merge pull request #12031 from amenonsen/deadcode
...
Remove unused (copied) _before_comment method
2015-08-20 23:36:56 -04:00
Brian Coca
f6b6ed530b
added file tests
2015-08-20 22:04:21 -04:00
Brian Coca
cd4a0c70b0
isnotanumber is not needed as jinja2 has builtin number test
2015-08-20 22:04:20 -04:00
Brian Coca
fe06577ac2
fixed mandatory test
2015-08-20 22:04:20 -04:00
Abhijit Menon-Sen
599ad9cb51
Remove unused (copied) _before_comment method
...
This was copied from inventory/ini.py, but the rewritten version doesn't
use it, and shows that it isn't needed.
2015-08-21 06:58:23 +05:30
Jon Hawkesworth
a46b500851
Add win_splitdrive filter for windows users
2015-08-20 13:54:54 +01:00
Brian Coca
961bee00d5
centralized the definition of 'localhost'
2015-08-19 15:49:37 -04:00
Brian Coca
1acb29ff9b
sequence will now run once for start=end, added test to suite
...
fixes #11979
2015-08-18 02:33:23 -04:00
Alphadelta14
77b60a1a67
Support any Mapping for with_dict lookup.
...
This resolves 3939348286
breaking `with_dict: hostvars`.
2015-08-17 20:11:24 -04:00
Brian Coca
c419cacb04
check if host task is none before continuing
...
fixes #11982
2015-08-17 18:56:04 -04:00
Brian Coca
950622cebd
made sure they all look in files/vars/template dirs also when executed in play and not only from task
2015-08-16 02:37:21 -04:00
Brian Coca
861fdfc5ba
updated callbacks to properly test diff no matter if dict or list
2015-08-16 02:37:21 -04:00
Brian Coca
79ea6d3a1e
copy now passes a list of diffs
2015-08-16 02:37:21 -04:00
Brian Coca
c3372936aa
diff can now be a list
2015-08-16 02:37:21 -04:00
Brian Coca
13c91ef9d4
actually use the read source contents for the diff
2015-08-16 02:37:21 -04:00
Brian Coca
45cebd283f
added remote_src to copy, now allows copying to be done on the target server
2015-08-16 02:37:21 -04:00
Brian Coca
1b7369cc8d
added diff to assemble for remote_src=false
2015-08-16 02:37:21 -04:00
James Cammarata
4836641683
Use ansible_python_interpreter value for remote checksums
...
Fixes #11968
Fixes #11969
2015-08-15 12:00:55 -04:00
Brian Coca
7a51836530
check for failure in fact gathering
2015-08-15 11:29:10 -04:00
Brian Coca
1edae51e05
added generic service module, step #1 to separating services to their own modules
...
falls back to current service module and requries service mgr facts and new service modules
2015-08-15 11:00:26 -04:00
Brian Coca
172e0c328c
fixed adhoc fact gathering
2015-08-15 11:00:10 -04:00
Brian Coca
0381923333
fixed call to setup module
2015-08-15 10:50:22 -04:00
Brian Coca
245e0dd4b7
made returns from next task consistent to avoid typeerrors, also linear now checks for none
...
fixes #11965
2015-08-14 18:07:14 -04:00
Brian Coca
9f5e4c0ef6
lookup plugin that does no flattening
2015-08-14 17:05:41 -04:00
Brian Coca
8af0ff4a58
Merge pull request #11567 from lekum/shelvefile_lookup
...
Add shelvefile lookup plugin
2015-08-13 10:47:44 -04:00
Brian Coca
fbc7224066
Merge pull request #11643 from bcoca/meta_inventory_and_fixes
...
Meta inventory and fixes
2015-08-13 10:36:57 -04:00
Brian Coca
5027f66562
Merge pull request #11864 from jhawkesworth/win_path_filters
...
add win_basename and win_dirname filters
2015-08-12 23:46:15 -04:00
Brian Coca
621b18c6ef
fixed source path discovery for unarchive in roles
...
fixes #11943
2015-08-12 22:50:30 -04:00
James Cammarata
ac66e4001c
Fix for variable precedence with tasks/includes
...
Fixes #11881
2015-08-12 10:49:45 -04:00
Brian Coca
e46b1e8d2b
adjusted tree to work more like v1, also now skips when dir not supplied
2015-08-12 10:35:49 -04:00
Brian Coca
49d88cef9c
meta: refresh_inventory and several inventory fixes
2015-08-12 10:35:12 -04:00
James Cammarata
e0b074000e
Merge pull request #11764 from lpirl/devel_v2
...
fixes remote code execution for su/sudo with strict remote umasks
2015-08-11 22:30:44 -04:00
Brian Coca
4d853a5d3c
implemented for v2, missing --tree option for adhoc
2015-08-11 19:18:10 -04:00
James Cammarata
adb9d7e461
Track role execution per-host, not overall in the role
...
Fixes #11863
Fixes #11878
2015-08-11 16:34:58 -04:00
James Cammarata
169d316704
Fixing bugs in include + loops
...
Fixes #11872
2015-08-11 01:33:43 -04:00
Brian Coca
7666bde666
updated hashi_vault to new listify, added to changelog
2015-08-10 21:10:00 -04:00
Brian Coca
4399ddc7da
Merge pull request #11674 from defionscode/hashi_vault_lookup
...
Hashicorp Vault lookup Plugin
2015-08-10 21:07:22 -04:00
Jonathan Davila
175068fdae
Hashicorp Vault lookup Plugin
2015-08-10 19:35:28 -04:00
Brian Coca
c08305a31f
set script command itself to be sudable and not use the chmod sudoable settings as it can
...
ignore sudo settings for script when become_user is not root
fixes #11902
2015-08-10 13:19:37 -04:00
Toshio Kuratomi
d35b956900
listify lookup plugin terms when they're specified as "{{ lookup(terms) }}"
...
Before this, they were not listified there but they were listified when
specified like this:
with_lookup: terms
2015-08-10 09:07:37 -07:00
Brian Coca
dbab703265
fine tuned password handling as we were getting false positives, probably caused by other changes up the stack that now call these functions in more cases.
2015-08-07 16:27:25 -04:00
Brian Coca
6fcfebd21d
made sure we need becoem before we format the command, added debug entry also
2015-08-07 16:27:25 -04:00
Brian Coca
df768e0db4
fixed debug statement
2015-08-07 16:27:25 -04:00
Brian Coca
177499476b
fixed warning
2015-08-07 16:27:25 -04:00
Brian Coca
8f106c9a58
Merge pull request #11078 from Yannig/devel
...
New lookup plugin : ini
2015-08-07 09:46:54 -04:00
Yannig Perré
07fcb50b9b
Porting ini lookup plugin against ansible v2.
2015-08-07 09:40:24 +02:00
James Cammarata
e7d0c9f820
Re-add vars to Base and standardize var processing
...
Fixes #11779
2015-08-07 00:06:30 -04:00
Brian Coca
3c57018a10
Merge pull request #11778 from Ensighten/add_credstash_plugin
...
add credstash lookup plugin
2015-08-06 23:27:18 -04:00
Brian Coca
d47d0b1d7f
now continue/abort mode allows ignoring other input
2015-08-06 22:16:30 -04:00
Brian Coca
a555a0652e
allow for vars_prompt and pause prompt to be skipped in non interactive settings
...
ansible-pull users rejoice
2015-08-06 19:20:45 -04:00
Brian Coca
29cd72b7d8
even simpler condition tree for pause
2015-08-06 18:40:15 -04:00
Brian Coca
dc80bc8929
now pause behaves like v1 pause
2015-08-06 18:09:59 -04:00
Brian Coca
f7707d8850
brought user_input back to pause
2015-08-06 17:49:14 -04:00
Brian Coca
cb2cfaebda
started porting chroot to v2
2015-08-06 08:55:22 -04:00