Note: In v1 we fix this by transforming into unicode just before we use
it (when we send it to jinja2) because jinja2 cannot handle non-ascii
characters in str.
In v2 our model is that all text values need to be stored as unicode
type internally. So we transform this to unicode when we read it from
the inventory file and save it into the internal dict instead.
- 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
Prevents an exception from raising in some corner cases where SSH might
be misconfigured. It seems not to fix a specific problem, although it
makes the method a little bit more solid.
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.
From v1: 68e86de26f730c2ba403
Dynamic task includes still need some work, this is a rough first version.
* doesn't work with handler sections of playbooks yet
* when using include + with*, the insertion order is backwards
* fix potential for task lists to be unsynchronized when using the linear
strategy, as the include conditional could be predicated on an inventory
variable