Commit Graph

57 Commits (1acd56a9aa3b30a291c7f7de4f67cb88281ce6b5)

Author SHA1 Message Date
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
10 years ago
Toshio Kuratomi ffb281d96c Merge pull request #9600 from msabramo/make_AnsibleError_a_plain_ol_exception
Make AnsibleError a plain ol' exception
10 years ago
Alejandro Guirao b8cf131375 Bug fix: Search only for files as candidates 10 years ago
Brian Coca 2642738646 changed jsonify test to ignore whitespace 10 years ago
Brian Coca bc5d0a8cd4 fixed jsonify test 10 years ago
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
10 years ago
Marc Abramowitz 372a29744b Make AnsibleError a plain ol' exception
Python's Exception constructor already takes a `message` as a parameter,
which you can then get at by doing str(e) (e.message was deprecated).

The reason I bothered to make this change was because I was debugging
with pdb and I noticed that AnsibleErrors don't give useful information
in pdb (probably because they don't have a __repr__ method that prints
the `msg` attribute).

    (Pdb) c
    > /Users/marca/dev/git-repos/ansible/lib/ansible/runner/__init__.py(599)_executor()
    -> msg = str(ae)
    (Pdb) ae
    AnsibleError()
10 years ago
Michael DeHaan d4da58e102 Merge pull request #9720 from vlajos/typofixes-vlajos-20141204
typofixes - https://github.com/vlajos/misspell_fixer
10 years ago
Veres Lajos bf5d8ee678 typofixes - https://github.com/vlajos/misspell_fixer 10 years ago
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
10 years ago
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
10 years ago
Toshio Kuratomi 4ae2d58d72 Fix detection of fips mode in test_do_encrypt_md5 10 years ago
Toshio Kuratomi e05b22e0d1 Skip some md5 related unit tests when running in fips mode 10 years ago
Toshio Kuratomi f1267c0b05 Move from md5 to sha1 to work on fips-140 enabled systems 10 years ago
Toshio Kuratomi 48a308a87c Allow both old-style and new-style role dependencies to be valid.
Fixes #9173
10 years ago
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
10 years ago
Toshio Kuratomi e6fcd90342 Merge pull request #9224 from drawks/iss9223
Resolve #9223 Fix test for python 2.6
10 years ago
Dave Rawks 5f54b57b6d Corrected indentation 10 years ago
Dave Rawks c070ab69f7 Resolve #9223 Fix test for python 2.6
* trivial test refactor to allow for python 2.6 compat
10 years ago
Bruno BAILLUET a25da4af05 Add a new inventory parameter (ansible_sudo_exe) to specify sudo command path. 10 years ago
Michael DeHaan d6e6d2a6ca Remove regex related to baby-JSON parsing only. 10 years ago
Michael DeHaan 26cdddaebf Tracebacks are now catchable with ignore_errors and have streamlined output. Also removes 'baby-JSON' for bash modules. 10 years ago
James Cammarata 317ab06bc6 Fixing multiline parsing to preserve newlines
Fixes #8813
10 years ago
James Cammarata 8cc3543918 Re-allow templating of complex_args, but count params to prevent injection
Fixes #8810
10 years ago
Michael DeHaan 8a0045baad Update tests for ansible-galaxy CLI additions. 10 years ago
Michael DeHaan d87830e1cc Merge branch 'galaxy_github_archive' of git://github.com/willthames/ansible into devel
Conflicts:
	lib/ansible/utils/__init__.py
10 years ago
James Cammarata d01188033f Checking for localized versions of the su password prompt
Fixes #8681
10 years ago
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
10 years ago
Michael DeHaan bcb44276fe Assume github.com URLs are git protocol if not specified. 10 years ago
Will Thames 6e9abefc11 Corrected bug where role_path was wrong for roles in subdirectories
Fixed role name for
    - { role: 'lives/in/a/subdirectory' }
Should be 'lives/in/a/subdirectory', not just 'subdirectory'
10 years ago
Will Thames 46b59b02ed Friendly Role Names and roles from URLs
* Roles can now be given a friendly name as third field in role spec csv
* Roles can be installed from URL (not just from archived SCMs)
* Integration tests to demonstrate this
* Unit tests to ensure that role spec parsing works as expected
10 years ago
Will Thames 4803e923ff Improved handling of role_version in repo_url_to_role_name 10 years ago
Will Thames c2fe33f9f4 Tidied up a little, added tests
Moved repo_url_to_role_name to common method in ansible.utils
Added unit test for repo_url_to_role_name
Added integration tests for galaxy
10 years ago
Michael DeHaan 99c39b1ff3 By popular request, make the no_log attribute also censor tasks from callbacks. 10 years ago
Michael DeHaan 2629cd3fce Fix some copyrights, fix a misc test. 10 years ago
James Cammarata 25e9d1197e Merge branch 'optimise_utils_clean_data' of https://github.com/leth/ansible into leth-optimise_utils_clean_data 10 years ago
Marcus Cobden e3dbca9378 Test escaping strings with two variables 10 years ago
James Cammarata 63bf2f6d9a Preserve all line breaks in literal blocks
Fixes #8512
10 years ago
James Cammarata af0d8cda7b Fix literal block multiline parsing
Fixes #8394
10 years ago
James Cammarata 6d94ae64ec Remove unnecessary unicode conversions from parse_kv
Fixes #8425
10 years ago
James Cammarata e6fa50a306 Move splitter to module_utils so modules can use it and fix command arg splitting
Fixes #8338
10 years ago
James Cammarata aee940aaca Reworking _clean_data() to be smarter about replaces
Fixes #8228
10 years ago
James Cammarata a8c2d6acd5 Adding unittest for space preservation within quotes when splitting args 10 years ago
James Cammarata 8f694c7588 Fixing unittests based on previous patch for splitting 10 years ago
Michael DeHaan 8d42f5cbfa Smush ds removal 10 years ago
Michael DeHaan eeb51b6bf3 Moar split_args tests 10 years ago
Michael DeHaan 630f080cf0 Start of unit tests for split_args function, moved split_args to utils since not needed by modules (so far). 10 years ago
James Cammarata 8ff0c0f253 Tweaking make_su_cmd test
Fixes #7652
10 years ago
Timothy Appnel 754d635aca Recent BSD su work introduced a failing test. Removed leading space from the assertion that seems to be the culprit. 10 years ago
James Cammarata 1e672a0fec Fixes for su on freebsd
Addresses multiple issues when using su on freebsd including
* su prompt differs between platforms, so turned that check into a
  regex comparison instead of a simple string comparison
* not using '-c' after su causes problems, so added that for all
  platforms
* fixed quoting issues due to multiple uses of '-c' introduced by
  the above fix

Fixes #7503
Fixes #7507
10 years ago