Toshio Kuratomi
b58d7470d4
Cleanup logic and be more paranoid about passwords with spaces
2015-10-12 12:55:33 -07:00
Brian Coca
f5f3bf06e4
Merge pull request #12550 from redrampage/remove-pw-salt-deletion
...
Removed deletion of salt by 'password' lookup
2015-10-12 11:33:19 -04:00
Brian Coca
4ba5ebd1c8
Merge pull request #12538 from yesbox/url_lookup_plugin_httperror_fix
...
Fix url lookup plugin HTTPError message not being reachable
2015-10-02 21:30:16 -04:00
Abhijit Menon-Sen
49b35ad5dd
Remove mysterious old cruft
...
The two lines were added in 2673eb0a
and modified in 60e1a1f8
, but foo
is completely unused. Removing it doesn't break anything: out it goes!
2015-10-01 20:32:08 +05:30
RedRampage
922b5c8109
Removed deletion of salt by 'password' lookup
...
Removed deletion of salt param from lookup file by 'password' lookup_filter.
Old behaviour leads to constant changed status when two tasks uses same lookup,
one with 'encrypt' parameter, and other without.
For example:
tasks:
- name: Create user
user:
password: "{{ lookup('password', inventory_dir + '/creds/user/pass' ncrypt=sha512_crypt) }}"
...
# Lookup file 'creds/user/pass' now contain password with salt
- name: Create htpasswd
htpasswd:
password: "{{ lookup('password', inventory_dir + '/creds/user/pass') }}"
...
# Salt gets deleted from lookup file 'creds/user/pass'
# Next run of "Create user" task will create it again and will have 'changed' status
2015-09-28 23:28:01 +03:00
Jesper Geertsen Jonsson
353b549eb0
Fix HTTPError message not being reachable
2015-09-27 18:01:19 +00:00
James Cammarata
60e1a1f8eb
Fix bug in nested lookup where pop is called indiscriminately
2015-09-25 17:16:56 -04:00
James Cammarata
65630d2ce1
Fixing one more bug related to staticmethods in LookupBase
2015-09-23 02:33:32 -04:00
James Cammarata
cbbb270761
Cleanup bug from moving base lookup methods to staticmethods
2015-09-23 02:26:19 -04:00
Toshio Kuratomi
c83f51b7f2
Some LookupBase cleanups:
...
* Make LookupBase an abc with required methods (run()) marked as an
abstractmethod
* Mark methods that don't use self as @staticmethod
* Document how to implement the run method of a lookup plugin.
2015-09-22 16:19:36 -07:00
James Cammarata
c95d4ca05f
Properly assign search path to environment.loader in template lookup
...
Same fix as was applied in f162990c
to the action plugin
Fixes #12355
2015-09-17 14:47:20 -04:00
Toshio Kuratomi
e2c49b4ef4
Fix problem with "=" in the initial file path.
2015-09-09 11:14:31 -07:00
Toshio Kuratomi
c68e04c185
Use parse_kv to correctly parse parameters from password lookup
...
Fixes https://github.com/ansible/ansible-modules-core/issues/1968
2015-09-04 12:18:46 -07: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
Brian Coca
b2bfe3502b
make sure delimiter is basestring for cvsfile
...
fixes #12062
2015-08-26 18:38:39 -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
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
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
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
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
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
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
Brian Coca
3c57018a10
Merge pull request #11778 from Ensighten/add_credstash_plugin
...
add credstash lookup plugin
2015-08-06 23:27:18 -04:00
Scott Cunningham
87ef53c962
credstash lookup plugin: python 2.6-compatible string.format()
2015-08-05 23:40:43 -07:00
Scott Cunningham
c4629b72e0
credstash lookup plugin: error out in run function when credstash not installed, not at module scope
2015-08-05 23:37:10 -07:00
Yannig Perré
09d257e637
Porting ini lookup plugin against ansible v2.
2015-08-05 12:07:16 +02:00
James Cammarata
dbd755e0f4
Fix jinja2 template search pathing
...
Fixes #9933
2015-08-04 22:50:16 -04:00
Scott Cunningham
934ce86d35
update credstash lookup plugin to use Python 2.4-compatible exception catching
2015-08-04 18:29:37 -07:00
James Cammarata
5266679964
Use templar all the way down
...
Fixes bugs related to creating Templar() objects on the fly, where
the shared loader objects (serialized to TaskExecutor) aren't used
so information loaded into plugin loaders after forking is lost.
Fixes #11815
2015-08-04 12:25:53 -04:00
James Cammarata
2673eb0afb
Add option to fail on undefined variables to listify
...
And use it in the call to get the loop items for a task.
2015-08-03 12:04:31 -04:00
Scott Cunningham
193e857bc4
credstash lookup plugin: raise AnsibleError when credstash library not installed
2015-07-30 21:04:26 +01:00
Scott Cunningham
695e456cb0
add credstash lookup plugin
2015-07-29 11:18:13 +01:00
James Cammarata
d6cafff2f9
Additional changes to fix fileglob relative path lookups
2015-07-27 16:35:57 -04:00
James Cammarata
ee835ff7ad
Add a base-level get_basedir method for lookup plugins and fix relative lookups
...
Fixes #11746
2015-07-27 10:41:28 -04:00
Abhijit Menon-Sen
8737061a8f
lookupfile should lookup the given file=xxx
...
(Earlier it used to lookup the pre-split term.)
2015-07-25 15:38:26 +05:30
Brian Coca
851ed45bbf
adding display to plugins and start moving debug to display
2015-07-23 10:26:12 -04:00
Brian Coca
b678b9828c
simplified and normalized lookup search path behaviour
2015-07-22 22:32:37 -04:00
Serge van Ginderachter
8d1549900c
fix AnsibleError object name in subelements plugin
...
fixes #11624
2015-07-17 17:39:31 +02:00
Alejandro Guirao
587a6cb44c
Remove v1 code
2015-07-13 15:48:23 +02:00
Alejandro Guirao
6e99023c84
Changed to support Ansible v2
2015-07-13 15:37:27 +02:00
Alejandro Guirao
8efc42d993
Add shelvefile lookup plugin
2015-07-13 10:31:35 +02:00
Brian Coca
5122455db8
ported missing sequence updates from 1.9
2015-07-03 13:54:51 -04:00
James Cammarata
9341148f04
Throw an error if with_first_found finds no files by default
...
Fixes #9976
2015-07-01 16:09:34 -04:00
Toshio Kuratomi
d315f6e22c
Fix Etcd constructor
2015-06-12 12:59:29 -07:00
Toshio Kuratomi
77c76e632e
Switch etcd and url lookup plugins to verify ssl certificates
2015-06-12 12:54:57 -07:00
Brian Coca
aaab69cae9
brought back terms testing as with_ is not only way to call and we cannot guarantee terms is a list otherwise.
2015-06-11 13:45:04 -04:00
Brian Coca
40336b50af
removed redundant string check
...
added playbook path lookup
2015-06-10 22:58:08 -04:00
Davide Guerri
ee06eebea3
Fix lookup() plugin
...
lookup() plugin is currently broken because _get_file_contents() now
returns a tuple: (contents, show_data).
This patch fix that issue.
2015-06-04 19:46:09 +01:00
Brian Coca
3e2e81d896
missing path in import path for making paths
2015-06-02 23:42:00 -04:00
Brian Coca
2590df6df1
created makedirs_safe function for use in cases of multiprocess
...
should fix #11126 and most race conditions
2015-06-02 11:41:30 -04:00
James Cammarata
9aa8676bdd
More template unit tests for v2
2015-05-17 01:06:02 -05:00
James Cammarata
830225d9c1
Fix errors in subelements lookup plugin and associated tests (v2)
2015-05-12 15:09:03 -05:00
Serge van Ginderachter
9b646dea41
Add optional 'skip_missing' flag to subelements
2015-05-12 12:52:16 -05:00
James Cammarata
ce3ef7f4c1
Making the switch to v2
2015-05-03 21:47:26 -05:00