Brian Coca
5f6db0e164
preliminary privlege escalation unification + pbrun
...
- become constants inherit existing sudo/su ones
- become command line options, marked sudo/su as deprecated and moved sudo/su passwords to runas group
- changed method signatures as privlege escalation is collapsed to become
- added tests for su and become, diabled su for lack of support in local.py
- updated playbook,play and task objects to become
- added become to runner
- added whoami test for become/sudo/su
- added home override dir for plugins
- removed useless method from ask pass
- forced become pass to always be string also uses to_bytes
- fixed fakerunner for tests
- corrected reference in synchronize action plugin
- added pfexec (needs testing)
- removed unused sudo/su in runner init
- removed deprecated info
- updated pe tests to allow to run under sudo and not need root
- normalized become options into a funciton to avoid duplication and inconsistencies
- pushed suppored list to connection classs property
- updated all connection plugins to latest 'become' pe
- includes fixes from feedback (including typos)
- added draft docs
- stub of become_exe, leaving for future v2 fixes
2015-03-10 18:42:36 -04:00
Monty Taylor
8758ba08bd
Update common OpenStack requests-related parameters
...
Also, update docs related to earlier changes in this stack.
2015-03-06 18:20:45 -05:00
Brian Coca
346689f9f2
Merge pull request #9293 from cchurch/module_suffixes
...
Simpler fix for module suffixes than c02e8d8c8
.
2015-02-26 23:33:51 -05:00
Toshio Kuratomi
0f4b72cdfa
Refactor loop to only calculate the full_path once
2015-02-26 16:01:42 -08:00
Toshio Kuratomi
68c99a12b3
Merge pull request #10346 from lekum/find_plugin_bugfix
...
Bug fix: Search only for files as candidates
2015-02-26 15:38:45 -08:00
Toshio Kuratomi
8a5067d628
Adapt sanitize_output to log messages instead of assuming properly formatted key-value pairs
...
Fixes #10332
2015-02-26 12:31:11 -08:00
Alejandro Guirao
b8cf131375
Bug fix: Search only for files as candidates
2015-02-26 19:13:07 +01:00
Monty Taylor
0b8773fc99
Remove state from central argument list
...
There is an old PR that shows a great use case for having a different
set of states for the server module. Before the other modules start
being in real use, pull this out so that we don't get ourselves into a
pickle.
2015-02-26 11:35:29 -05:00
Brian Coca
57674fa047
Allow requesting a list to lookup plugins instead of , delimited string
2015-02-19 18:29:29 -05:00
Brian Coca
1e818f9c50
ansible-doc now shows return value docs
2015-02-19 13:18:05 -05:00
jensdepuydt
730c2ba403
minor change to not search in non-existing paths
2015-02-18 12:07:35 +01:00
Toshio Kuratomi
68e86de26f
Optimize the plugin loader.
...
We have been caching the paths to the plugins but before we would only
cache the specific plugin that we were looking for. This meant that we
might search through all of the plugin directories before finding the
specific module we were interested in. The next plugin we needed we
might again search through all the plugin directories before finding the
plugin we wanted.
This new code will cache all the potential plugins in each directory
searched. For a play that only uses one plugin we'll only search
through directories until we encounter the directory that has the proper
plugin. For a large playbook with many plugins used we'll search
through each directory at most once each.
This should alleviate #10165
2015-02-17 13:24:46 -08:00
Brian Coca
e41d48104f
valutpass fix in password reorog
2015-02-16 12:24:43 -05:00
Cove Schneider
825654a2fa
parse yaml using cparser if present
2015-02-16 00:26:35 -08:00
Brian Coca
932fd2eda2
fixed vault pass also
2015-02-12 19:03:50 -05:00
Brian Coca
0087816b13
fixed varname su_pass
2015-02-12 19:03:04 -05:00
Brian Coca
5f2d5abeea
ensure proper strings/unicodestrings for passwords
...
updated to correct to_bytes function
removed old to_bytes/to_unicode and repointed clients to new location
fixed unicode test
2015-02-12 17:44:08 -05:00
Toshio Kuratomi
9d605171a7
Didn't port isbasestring/isunicodestring from kitchen so switch to isinstance
2015-02-12 13:55:27 -08:00
Brian Coca
0912781357
Merge pull request #9421 from emonty/features/new-openstack
...
Add support for new OpenStack modules
2015-02-12 10:26:12 -05:00
Matt Martz
68358e31fb
Allow ansible (ad-hoc) to support --extra-vars also
2015-02-11 19:34:01 -06:00
Monty Taylor
9b17918bc9
Add doc fragment for new OpenStack modules
2015-02-11 14:04:59 -05:00
Brian Coca
c966eb5d80
Merge pull request #10015 from bcoca/nicer_json_errors
...
handle json load errors as ansible error instead of ugly stacktrace
2015-02-11 13:31:25 -05:00
Nicolas Le Manchet
faa2449f55
Set proper permissions for ansible-vault view
2015-02-11 14:15:38 +01:00
Henk Wiedig
0a902a5afd
make su promt AIX compatible
...
$ su suuser date
suusers's Password:
2015-02-10 05:18:37 -05:00
Brian Coca
75d3c6b104
Merge pull request #10185 from bcoca/valut_editor_missing_err
...
better missing editor message
2015-02-09 18:16:57 -05:00
Toshio Kuratomi
4902c06304
Obfuscate passwords in more places where it is displayed
2015-02-09 10:13:13 -08:00
Brian Coca
8b7dc6bbfb
better missing editor message
...
fixes #10182
2015-02-08 23:26:56 -05:00
Toshio Kuratomi
a04138a887
Add v2's unicode.py to utils so we can use unicode_wrap in the filter_plugins
2015-02-02 19:09:08 -08:00
Toshio Kuratomi
1011959d88
Move the hashing util functions to their own file to mirror v2
2015-02-02 10:25:09 -08:00
Toshio Kuratomi
3d5523fbb7
Fix for unicode filenames for template module
...
Fixes #10110
2015-01-28 14:24:57 -08:00
Brian Coca
9d190c8d8d
Revert "Support variable values with dashes"
2015-01-26 12:54:50 -05:00
Brian Coca
13bbf9bfbb
Merge pull request #9834 from nathancahill/fix-variables-with-dashes
...
Support variable values with dashes
2015-01-26 12:51:56 -05:00
Brian Coca
c09d27bca1
handle json load errors as ansible error instead of ugly stacktrace
2015-01-15 12:03:13 -05:00
Mick Bass
17498b58bb
Add support for AWS Security Token Service (temporary credentials) to all AWS cloud modules.
2014-12-25 13:31:34 -07:00
Toshio Kuratomi
5ed7a55990
Restore json import for redis as well. Switch preference to simplejson for speed
2014-12-23 13:14:14 -08:00
Nathan Cahill
6d785ca081
support variables with dashes - fixes #9786
2014-12-16 20:58:38 -07:00
Nicolas Rémond
3cf0c09ce9
Variables lookup in a template should handle properly the undefined case
2014-12-12 12:11:17 +01:00
Brian Coca
97408fe5b2
Revert "Make listify respect the global setting for undefined variables."
...
This 'mostly' reverts commit 2769098fe7
.
Conflicts:
lib/ansible/utils/__init__.py
test/units/TestUtils.py
2014-12-04 09:14:53 -05:00
Brian Coca
e938f554b7
better exception handling for unexpected exceptions
2014-12-04 08:01:38 -05:00
Brian Coca
f2b853f7a0
changed plugin load priority to be path based, not suffix based.
2014-12-01 17:36:57 -05:00
Brian Coca
9a5cbf747a
fine tuned lookup/templating errors
2014-11-26 22:06:37 -05:00
Brian Coca
db145a368d
now only flattened ignores failonundefined cause of it's special need
2014-11-25 16:12:15 -05:00
Brian Coca
e3feb104c3
fixes issues with listyfing failing too often
2014-11-25 15:55:53 -05:00
Brian Coca
7d2937b1cc
minor fixes to template function
...
- make sure it calls itself correctly, now passes same params as it recieves
- vars is reserved, changed for templatevars to avoid confustion
- forcing mustaches again since the removal broke 'listification' as per #9622
- fixes incorrectly successful tests using undefined var, now it is defined
- now returns empty list if items is None to avoid errors
2014-11-25 12:59:13 -05:00
Toshio Kuratomi
c4c3cc315d
Transform both values of a task name into a byte str prior to comparing
...
Fixes #9571
2014-11-19 11:50:02 -08:00
Toshio Kuratomi
25607e5cf4
When run in FIPS mode, allow vault to fail only when using legacy format
2014-11-17 16:38:56 -08:00
Brian Coca
395952329a
Merge pull request #9529 from sivel/env-nested-modules
...
Support nested modules with ANSIBLE_LIBRARY env var
2014-11-12 10:59:18 -05:00
Toshio Kuratomi
9a7eb57718
Some changes to FIPS compat since SLES implements it differently
2014-11-11 20:23:03 -08:00
Toshio Kuratomi
6a85f3ebc7
Add comments/docstrings not to use md5 unless forced to by forces outside our control.
2014-11-10 12:01:44 -08:00
Matt Martz
4c2d06d2fe
Support nested modules with ANSIBLE_LIBRARY env var
2014-11-10 10:52:23 -06:00
Toshio Kuratomi
f1267c0b05
Move from md5 to sha1 to work on fips-140 enabled systems
2014-11-06 21:28:04 -08:00
Brian Coca
b3b356480d
added the ability to keep aliased and deprecated modules prefixed with
...
'_', they will be loaded after non prefixed modules are checked they can
be full modules or symlinks to existing ones (alias)
also updated ansible doc to ignore these, will eventually add selective
display
2014-10-27 15:54:41 -07:00
James Cammarata
9ee3cd14ee
Fix typo in vault edit helper code
...
Fixes #9399
2014-10-22 11:08:01 -05:00
Toshio Kuratomi
3d135f98d1
Small python3 compat in vault to keep code in sync with v2
2014-10-21 10:32:25 -04:00
Toshio Kuratomi
da9d87b1d4
Make vault file creation use a tempfile
2014-10-21 00:32:08 -04:00
James Cammarata
b61a78532c
Catch template syntax errors specifically when templating strings
...
Fixes #9333
2014-10-20 13:11:20 -05:00
Toshio Kuratomi
48a308a87c
Allow both old-style and new-style role dependencies to be valid.
...
Fixes #9173
2014-10-09 02:48:47 -04:00
Toshio Kuratomi
c75aeca435
Merge removal of complex_args_hack
2014-10-08 15:03:43 -04:00
Toshio Kuratomi
a10d10f647
Workaround more python-2.6 shlex not being able to handle unicode strings
2014-10-08 14:30:36 -04:00
Chris Church
8fb88be41b
Simpler fix for module suffixes than c02e8d8c8
.
2014-10-08 11:53:06 -04:00
Rob Howard
2769098fe7
Make listify respect the global setting for undefined variables.
...
(Fixes #9008.)
With credit to jimi-c for the initial pass in this commit:
b18bd6b98e
2014-10-08 13:47:11 +11:00
James Cammarata
05644686de
Fix bug in plugin path caching
...
Fixes #9263
2014-10-04 21:47:38 -05:00
Toshio Kuratomi
cef2a8795f
Make dynamic inventory return byte str, not unicode
2014-10-02 20:27:06 -04:00
James Cammarata
d99e4f15c8
Merge pull request #9220 from jlaska/devel
...
Resolve issue where repo_path contains multiple '.git' strings
2014-10-01 14:23:23 -05:00
Toshio Kuratomi
0af750e3e5
Merge pull request #9182 from bbasleeper/feature_sudo_exe_from_inventory
...
Add a new inventory parameter (ansible_sudo_exe) to specify sudo command...
2014-09-30 14:55:46 -04:00
James Cammarata
05994cd900
Don't clear paths when adding a new directory path in PluginLoader
2014-09-30 09:43:40 -05:00
James Laska
684352926b
Resolve issue where repo_path contains multiple '.git' strings
...
If the repo_path contained multiple '.git' strings, the _git_repo_info()
call resulted in a traceback. This change removes the trailing '.git'
and resolves the traceback.
2014-09-30 10:33:42 -04:00
Michael DeHaan
c02e8d8c80
Don't search powershell modules unless using the winrm connection.
2014-09-28 12:17:03 -04:00
Michael DeHaan
3908d50b03
Tolerate no module search path.
2014-09-28 12:10:36 -04:00
Michael DeHaan
1d17881960
Add module search path to --version output.
2014-09-28 11:39:04 -04:00
Michael DeHaan
21c3784a43
If submodules are not found, don't error out.
2014-09-28 11:25:04 -04:00
Will Thames
952a36920c
Cater for uninitialized submodules
...
Output a useful message if `git submodule update --init --recursive` not
yet performed
```
$ ansible --version
ansible 1.8 (submodule_ansible_version 59ae596484) last updated 2014/09/28 13:20:51 (GMT +1000)
lib/ansible/modules/core: (detached HEAD 617a52b20d) last updated 2014/09/28 13:15:25 (GMT +1000)
lib/ansible/modules/extras: not found - use git submodule update --init lib/ansible/modules/extras
```
2014-09-28 11:25:04 -04:00
Will Thames
d1476aeb01
Updated version info to include submodule information
...
`ansible --version` etc. now include information about submodules
```
ansible 1.8 (submodule_ansible_version ffee9a8fe0
) last updated 2014/09/28 11:03:14 (GMT +1000)
lib/ansible/modules/core: (ec2_snapshot_remove 3a77c31ecb) last updated 2014/09/27 18:23:31 (GMT +1000)
lib/ansible/modules/extras: (detached HEAD 110250d344) last updated 2014/09/27 14:33:42 (GMT +1000)
```
Also improved handling of detached HEAD when printing out version
information.
2014-09-28 11:25:04 -04:00
Bruno BAILLUET
a25da4af05
Add a new inventory parameter (ansible_sudo_exe) to specify sudo command path.
2014-09-27 17:39:49 +02:00
Michael DeHaan
e5116d2f9b
changes for package loading of modules
2014-09-26 11:25:56 -04:00
Michael DeHaan
25cc79e2db
Modules is a package.
2014-09-26 10:55:00 -04:00
James Cammarata
128c10b311
Don't template 'vars' dictionary during templating
...
Fixes #9132
2014-09-25 14:46:16 -05:00
James Cammarata
889dfc4374
Merge pull request #8959 from willthames/galaxy_ssh_clone
...
Allow fairly common ssh repo clone path to work
2014-09-23 14:58:29 -05:00
James Cammarata
9d45f3a65e
Before decrypting check if vault password is set or error early
...
Fixes #8926
2014-09-19 15:10:30 -05:00
James Cammarata
b376e208c7
Adding "follow" param for file/copy options
...
Also modifies the template action plugin to use this new param
when executing the file/copy modules for templating so that links
are preserved correctly.
Fixes #8998
2014-09-16 12:05:55 -05:00
Michael DeHaan
d6e6d2a6ca
Remove regex related to baby-JSON parsing only.
2014-09-11 13:30:10 -04:00
Michael DeHaan
26cdddaebf
Tracebacks are now catchable with ignore_errors and have streamlined output. Also removes 'baby-JSON' for bash modules.
2014-09-11 12:27:21 -04:00
Will Thames
d6a725659e
Allow github style ssh repo names
2014-09-10 21:55:27 +10:00
Will Thames
537472f42c
Make ansible-galaxy work as expected
...
This change fixes hg galaxy roles
Roles also get installed if roles path is missing, which
the tests currently require (fixes #8950 )
2014-09-10 09:16:30 +10:00
Niko Felger
fa74a5c806
Fixing issue with symlinked vaults
2014-09-08 16:10:18 +02:00
James Cammarata
8cc3543918
Re-allow templating of complex_args, but count params to prevent injection
...
Fixes #8810
2014-09-05 14:24:05 -05:00
James Cammarata
04da466c7b
Fixing up serialize_args utility function
2014-08-27 10:20:07 -05:00
James Cammarata
e99db078b4
Additional fixes for the new omit parameter variable
2014-08-27 10:06:55 -05:00
Victor Lin
559c04f324
Implement omit for module args, also add tests for it
2014-08-27 10:04:47 -05:00
Victor Lin
0b4d7f1574
Implement default omit filter
2014-08-27 10:03:07 -05:00
James Cammarata
811ff49f78
Updating CHANGELOG for new symbolic mode feature and updating file docs
2014-08-25 23:47:41 -05:00
y_nk
affdadda25
handling case of space in path (given would start with single quote)
2014-08-25 21:26:47 +05:30
Michael DeHaan
8a0045baad
Update tests for ansible-galaxy CLI additions.
2014-08-22 14:01:15 -04:00
Michael DeHaan
d87830e1cc
Merge branch 'galaxy_github_archive' of git://github.com/willthames/ansible into devel
...
Conflicts:
lib/ansible/utils/__init__.py
2014-08-22 13:58:50 -04:00
James Cammarata
d01188033f
Checking for localized versions of the su password prompt
...
Fixes #8681
2014-08-22 09:59:40 -05:00
Michael DeHaan
0286c31e85
Assume master branch for downloads if not specified.
2014-08-22 10:01:13 -04:00
Michael DeHaan
0cd40fc372
Remove debug
2014-08-22 09:58:27 -04:00
Will Thames
850963790d
Allow roles to be installed from archives on github
...
Ensure that the automated scm determination for github.com
repos still copes with .tar.gz archive files.
Handling .zip archives is left as an exercise for the interested reader
2014-08-22 10:06:21 +10:00
Michael DeHaan
bcb44276fe
Assume github.com URLs are git protocol if not specified.
2014-08-21 17:15:23 -04:00
Michael DeHaan
68e21aa4b0
Add comments about what these new functions do.
2014-08-21 17:15:23 -04:00