Commit Graph

553 Commits (1fd0a78b0e376d6ea4c8d3f1ad8ed68b9470cdfa)

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
2015-03-10 18:42:36 -04:00
Chris Church 919db1025c Merge pull request #9601 from cchurch/set_delegate_before_connect
Set delegate on connection plugin before calling connect()
2015-03-08 21:12:39 -04:00
Will Thames 13a591eac0 Don't log item data for skipped tasks under no_log
Tasks with `no_log` set should not log data.
Remove log of item data for skipped tasks in loops

Fix for #10387
2015-03-05 14:51:05 +10: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
Henry Finucane 2e4191c013 Add `groups` back into inline templates 2015-02-15 20:16:41 -08:00
Brian Coca 0b8101aec3 Merge pull request #10141 from dresden-weekly/fix_#10051
fixes #10051 as suggested by @aikomastboom
2015-02-11 13:57:04 -05:00
Brian Coca 7ea2aff272 Merge pull request #9772 from jszwedko/allow-template-for-retries
Allow retries to be templatable
2015-02-03 07:08:22 -05:00
Andreas Reischuck 6609f3ac03 fix suggested by @aikomastboom 2015-01-30 21:04:52 +01:00
Brian Coca 2ef5d6be1e Merge pull request #9702 from bcoca/better_errors_on_delegate
better exception handling with delegated hosts
2015-01-19 15:25:01 -05:00
Shawn Siefkas 682b987567 Add stdout_lines to results when using with_items 2015-01-13 13:34:25 -06:00
Costi Ciudatu 1ed9b6629e run_once tasks are skipped without checking the delegate_to host #9784 2014-12-24 02:22:38 +02:00
jszwedko 462471209e Allow retries to be templatable
Fixes #5865
2014-12-10 16:54:58 -05:00
Michael DeHaan d4da58e102 Merge pull request #9720 from vlajos/typofixes-vlajos-20141204
typofixes - https://github.com/vlajos/misspell_fixer
2014-12-08 14:00:52 -08:00
Toshio Kuratomi 3269a349f3 Fix remote_checksum with delegate_to and add tests for several ways that delegate_to works 2014-12-08 12:44:44 -08:00
Toshio Kuratomi b042fcc349 Fix for delegate_to with hosts that aren't in inventory 2014-12-05 12:35:43 -08:00
Veres Lajos bf5d8ee678 typofixes - https://github.com/vlajos/misspell_fixer 2014-12-04 22:23:35 +00:00
Brian Coca e938f554b7 better exception handling for unexpected exceptions 2014-12-04 08:01:38 -05:00
Toshio Kuratomi a2b2e54992 Fix checksum code to work with delegate_to/local_action
Fixes #9704
2014-12-03 14:43:03 -08:00
Brian Coca 1c5f625295 corrected exception name 2014-12-03 14:19:11 -05:00
Toshio Kuratomi 1ec8b6e3c5 Have remote_expanduser honor sudo and su users.
Fixes #9663
2014-12-03 10:46:56 -08:00
Brian Coca 61a30e5f49 better exception handling with delegated hosts 2014-12-03 07:26:42 -05:00
Chris Church 2bf269568b Merge pull request #9688 from cchurch/fix_win_fetch
Fixes for fetch module when connecting to Windows hosts
2014-12-02 15:15:06 -05:00
James Cammarata 29d41bb789 Revise patch from earlier using even more variable sources for HostVars
Superceeds e61e8a3

Fixes #9684
2014-12-01 21:44:42 -06:00
Chris Church de267b5655 Fix PowerShell plugin issues affecting fetch module when used against Windows hosts. 2014-12-01 22:18:35 -05:00
James Cammarata e61e8a37f5 Use extra vars when creating HostVars
Fixes #9667
2014-12-01 11:51:09 -06: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
Chris Church de2746ae86 Set delegate on connection prior to calling connect. 2014-11-23 21:49:33 -05:00
James Cammarata 4b6b58ab11 Fix role parameter precedence after 9a0f8f0
Fixes #9497
2014-11-20 12:53:48 -06:00
James Cammarata 9a0f8f0158 Split out various vars-related things to avoid merging too early
Fixes #9498
2014-11-17 15:31:55 -06:00
Toshio Kuratomi bc4272d2a2 Expand tilde remotely in action plugins 2014-11-11 12:28:19 -08:00
Toshio Kuratomi 30c50020a1 Better way to get the python_interpreter inventory variable 2014-11-10 09:16:20 -08:00
Toshio Kuratomi f1267c0b05 Move from md5 to sha1 to work on fips-140 enabled systems 2014-11-06 21:28:04 -08:00
James Cammarata 9ae0fb5bdf Make OSX fallback to paramiko more selective
Only fallback to paramiko now when the ssh password has been set,
either through inventory or via a prompt.

Fixes #9470
2014-11-03 14:32:15 -06:00
James Cammarata b4f9631e4c Revert "remove complex_args_hack as it was only needed for Baby JSON"
This reverts commit a6029264b8.

Fixes #9400
2014-10-22 11:00:24 -05:00
James Cammarata 2eda9a3a47 Fixing item loop when undefined variable errors occur because of missing attributes
Fixes a case where the variable 'foo' may exist, but the with_items loop
was used on something like 'foo.results', where 'results' was not a valid
attribute of 'foo'. Prior to this patch, conditionals were not evaluated
until later, meaning there was no opportunity to allow a test to skip the
task or item based on it being undefined.
2014-10-10 12:26:04 -05:00
James Cammarata d19fe8d95d Fetch vars for host directly when calculating the delegated user
This fixes the case in which the delegated to host may not be in the
specified hosts list, in which cases facts/vars for the host were
not available in the injected hostvars.

This also fixes the inventory variable fetching function, so that an
unknown host raises a proper error as opposed to a NoneType exception.

Fixes #8224
2014-10-10 01:18:18 -05:00
Toshio Kuratomi a6029264b8 remove complex_args_hack as it was only needed for Baby JSON 2014-10-08 13:26:25 -04:00
Chris Church 8fb88be41b Simpler fix for module suffixes than c02e8d8c8. 2014-10-08 11:53:06 -04:00
James Cammarata f3714c88a6 Revert "atfork import warning should be suppressed when system_warnings = False"
This reverts commit a175168686.
2014-10-06 15:05:52 -05:00
Bruce Pennypacker a175168686 atfork import warning should be suppressed when system_warnings = False
Fixes #9247
2014-10-03 15:48:56 -05:00
James Cammarata 313f26f866 Fix issue with vars precedence from roles
Fixes #9219
2014-09-30 15:50:46 -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
Michael DeHaan c02e8d8c80 Don't search powershell modules unless using the winrm connection. 2014-09-28 12:17:03 -04:00
Michael DeHaan 91c5890247 Add some helpful detection if core modules are not found for those running on the development branch. 2014-09-28 11:31:51 -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
James Cammarata 6af5455edc Default 'smart' connection to paramiko for OSX platforms
Due to the long-standing bug in sshpass, which can crash OSX.

Fixes #5007
2014-09-25 19:22:35 -05:00
James Cammarata c3612e08f9 Move delegate_to out of runner module_vars to prevent bleeding across runs
Previously, the delegate_to value was stored in the module_vars of runner,
which could lead to bleeding that value across runs and incorrect hosts
being delegated to. This patch moves the value to a local variable in
the Runner class with some related refactoring of _compute_delegate() in
Runner (since the value is no longer required to be a parameter).

Fixes #8705
2014-09-17 14:24:31 -05:00
James Cammarata ed3c9c40ca Redoing patch for hostvars fix, since the previous one broke other tests 2014-09-17 11:04:10 -05:00
James Cammarata 3180a37457 Revert "Revert to using just the combined_cache for HostVars"
This reverts commit e9229cfeaa.
2014-09-17 11:04:10 -05:00