Compare commits

..

570 Commits

Author SHA1 Message Date
49f7e6a12c update submodule pointer 2016-02-23 14:22:01 -05:00
d70fd17cf9 Merge pull request #14618 from ogenstad/devel
Fixes authentication error bug when user has rsa keys
2016-02-23 14:20:49 -05:00
5d5abbb898 bump next VERSION for -network 2016-02-18 21:36:16 +00:00
3f7b7a1bb9 update submodule pointer 2016-02-18 21:34:02 +00:00
858a0a2339 bugfix on shared module utils from missed cherry-pick
One of the commits was missed when the branch was created.  This fixes the
modules so they work properly
2016-02-18 21:13:57 +00:00
61989f72cc VERSION rename for the -network release 2016-02-17 17:11:44 -05:00
b3da42a669 Updating submodule pointer for the network branch 2016-02-17 16:30:42 -05:00
e15daf186a minor bugfix that will catch connection errors in eos
This commit fixes a situation where connection errors would be caught
but no useful information display.  The connection error is now caught
and emitted in a call to fail_json
2016-02-17 15:41:44 +00:00
9c4467303f minor bugfix that will catch connection errors in ios
This commit fixes a situation where connection errors would be caught
but no useful information display.  The connection error is now caught
and emitted in a call to fail_json
2016-02-17 15:41:37 +00:00
df3f9345e1 minor bugfix that will catch connection errors in iosxr
This commit fixes a situation where connection errors would be caught
but no useful information display.  The connection error is now caught
and emitted in a call to fail_json
2016-02-17 15:41:30 +00:00
5c7c13b9c1 minor bugfix that will catch connection errors in nxos
This commit fixes a situation where connection errors would be caught
but no useful information display.  The connection error is now caught
and emitted in a call to fail_json
2016-02-17 15:41:23 +00:00
0ef6a7ae98 minor bugfix that will catch connection errors in junos
This commit fixes a situation where connection errors would be caught
but no useful information display.  The connection error is now caught
and emitted in a call to fail_json
2016-02-17 15:41:13 +00:00
1fd5bcdc09 minor bug fixes and updates to shell 2016-02-17 15:40:49 +00:00
d178c4be2a Move Conditional class to netcfg.
Added error handling for connect and execute methods.

Fix comments
2016-02-17 15:40:30 +00:00
be846c7053 initial add of action plugin ops_template
Adds new local action ops_config for handling openswitch configurations using
either dc or cli based configurations.  Implements the common net_config
local action.

Note this refactors the ops_config plugin to ops_template
2016-02-17 15:38:36 +00:00
fa2834d863 initial add of new action plugin junos_template
This adds a new action plugin, junos_template that allows the
the junos_template module to perform the templating function.  It
implements net_template
2016-02-17 15:38:29 +00:00
320e099c12 initial add of action plugin nxos_template
Adds new local action for working with cisco nxos configurations.  Implemements
the net_config local action.

Note this action plugin was refactored from nxos_config to nxos_template
2016-02-17 15:38:23 +00:00
f0ee61925a adds new action plugin iosxr_template
This adds a new action plugin iosxr_template that allows the
iosxr_template module to pass network device configurations through the
template engine.  It also allows configurations to be backed up.
2016-02-17 15:38:17 +00:00
d024517d4b initial add of action plugin ios_template
Adds a new local action ios_config for working with cisco ios configuration
files.  Implements the common net_confing local action

Note this plugin was refactored from ios_config to ios_template
2016-02-17 15:37:32 +00:00
651842a4ef initial add of action plugin eos_template
Adds a new local action for eos_config module to handle templating configs
and backing up running configurations.   Implements the local action
net_config

Note this action was refactored from eos_config to eos_template
2016-02-17 15:37:23 +00:00
ee7de10285 Add safety check on _backup key. 2016-02-17 15:37:11 +00:00
bec698052f New release v2.0.1.0-0.2.rc2 2016-02-15 16:02:44 -05:00
729dbe7e67 removed follow from common file docs 2016-02-15 14:14:22 -05:00
032d917e68 Update changelog for dnf fix 2016-02-13 02:09:26 -08:00
9ecdec0141 Update submodule refs 2016-02-13 02:09:26 -08:00
028c710380 Fix bugs related to task_includes and dep chain inheritance
* Fix the way task_include fields were created and copied
* Have blocks get_dep_chain() look at task_include's blocks for proper
  dep chain inheritance
* Fix the way task_include fields are copied to prevent a recursive
  degradation

Fixes #14460
2016-02-13 01:09:16 -05:00
8ee8872d6b Fixing bugs related to nested blocks inside roles
* Make sure dep chains are checked recursively for nested blocks
* Fixing iterator is_failed() check to make sure we're not in a
  rescue block before returning True
* Use is_failed() to test whether a host should be added to the TQM
  failed_hosts list
* Use is_failed() when compiling the list of hosts left to iterate
  over in both the linear and free strategies

Fixes #14222
2016-02-12 16:41:38 -05:00
caf1537510 Display the string which is causing an exception to be raised.
In the ansible template module, when there is an error while
expanding a templated string, displaying the string causing the
exception is very useful.
2016-02-11 22:51:26 -05:00
6f54b1ae2b removed signal trapping 2016-02-11 22:03:00 -05:00
f77690e652 update extras submodule ref
for ec2_vpc_net_facts and elasticsearch module updates
2016-02-11 13:37:41 -08:00
5336a51a9e Update submodule for fix to mysql_user password 2016-02-11 13:09:59 -08:00
9c049b757f Revert "Module params should default to str in most cases."
This reverts commit 9fae8501e2.

Reverting for 2.0.1 -- this has been broken in the 2.0 tree for long
enough that some modules are relying on the broken behaviour.  This fix
will definitely return for 2.1.0 and may return in 2.0.2 (impact needs
to be evaluated).
2016-02-11 12:58:41 -08:00
0ccbbe0c09 allow skipping tasks due to undefined var
mimic 1.x behaviour but give out big deprecation message, not only
for missing attribute but any undefined error.
2016-02-11 14:32:49 -05:00
43bbd4b6dc termination handling
- moved to base cli class to handle centrally and duplicate less code
- now avoids duplication and reiteration of signal handler by reassigning it
- left note on how to do non-graceful in case we add in future
  as I won't remember everything i did here and don't want to 'relearn' it.
2016-02-11 12:42:12 -05:00
517eec8c49 fix cartesian lookup
it seems that this was not working in 1.9 but we swallowed up the error
fixes #14437
2016-02-11 10:36:04 -05:00
b85d9acc09 update core submodule ref 2016-02-10 22:32:32 -08:00
ba5a3f2f67 Update submodule ref 2016-02-10 17:38:24 -08:00
eafc46512d fix typo 2016-02-10 17:37:18 -08:00
39a53c5623 add ismount function from python Lib/posixpath.py
needed for https://github.com/ansible/ansible-modules-core/pull/2737
2016-02-10 17:37:07 -08:00
9fae8501e2 Module params should default to str in most cases. 2016-02-10 15:33:30 -08:00
724761d2a1 read full file when doing diff
but avoid reading file at all or full file when file is too big for diffing
2016-02-10 15:47:44 -05:00
3e2b2b359c Clarify error message when module replacer encounters a bad import line for module_utils code 2016-02-10 08:47:45 -08:00
5ebd5c548c Catch exceptions during module execution so they don't fail the worker
Fixes #14120
2016-02-10 09:24:44 -05:00
18ffa8a4da avoid termination message when term is internal 2016-02-09 18:11:11 -05:00
fa88d0770c Proposed fix for ansible/ansible-modules-extras#1348 due to datetime.datetime type not being matched 2016-02-09 17:12:36 -05:00
24cae22e0b Submodule pointer update 2016-02-09 13:29:45 -05:00
4f2a2ec884 strip BECOME-SUCCESS at lower level
Fixes #14395
2016-02-09 13:12:46 -05:00
7d44063c1e Filter become success string from the stdout of script results
Fixes #14390
2016-02-09 12:38:31 -05:00
dcc0a2d596 Also hide the before state of files with --diff and no_log 2016-02-08 22:06:38 -08:00
c97afd0c48 fix winrm erorr formatting 2016-02-08 23:00:49 -05:00
7c726d197b correctly handle term signals
- adhoc now terminates gracefully
- avoid race condition on terminations by ignoring errors if
  worker might have been reaped between checking if active and termination call
- ansible-playbook now properly exits on sigint/term
- adhoc and playbook now give exceptions that we should not normally capture
  and rely on top level finally to reap children
- handle systemexit breaks in workers
- added debug to see at which frame we exit
partial fix for #14346
2016-02-08 17:23:13 -05:00
13c379dcd0 Added more info to the no action detected error
Error fix
2016-02-08 16:57:54 -05:00
9196a72c3f Add support ssh configs from /etc/openssh.
In Altlinux system config dir for openssh is /etc/openssh.
2016-02-08 10:32:46 -05:00
0b4a259444 Also chmod the args file path when using become for old-style modules
Fixes #14348
2016-02-08 10:02:34 -05:00
5353b8c3b6 Allowing multiple tags to be specified in include's tags argument. 2016-02-08 08:52:55 -05:00
6869ced587 Update core submodule ref to fix apt locale bug 2016-02-07 14:27:48 -08:00
87414e4fd1 Add locale fixes to changelgo 2016-02-07 13:11:32 -08:00
ef9c27e280 Update submodule refs 2016-02-07 12:56:57 -08:00
76ab1d2afc Allow setting run_command environment overrides for the life of an AnsibleModule 2016-02-07 12:55:58 -08:00
a316891968 tag the setup task with always
fixes #14228
2016-02-05 10:35:31 -05:00
3303f25a0c Fix --diff to respect no_log task parameter. 2016-02-04 12:47:44 -08:00
bee699a33a Update submodule refs 2016-02-04 11:12:10 -08:00
4133cf924a Also add 'null' as a possible JSON value 2016-02-04 11:39:20 -05:00
53559433ef Defined JSON booleans in global context for python eval()
We define 'false' and 'true' as variables so that python eval() recognizes them as False and True.

This fixes #14291.
2016-02-04 11:39:20 -05:00
8ca8459af5 Merge pull request #14214 from dvarrazzo/conflicting-actions-message
Better "conflicting action statements" message
2016-02-03 22:55:35 -05:00
6c559e904a Handle when the lookup-plugin is used in jinja-style
This fixes #14190.
2016-02-03 11:18:51 -05:00
901beeec55 avoid logging color codes 2016-02-03 11:00:08 -05:00
4604deca92 Change $() into backticks. Backticks should work for both POSIX and non-POSIX compatible shells.
Fixes #14176
2016-02-02 12:39:55 -08:00
d001c73699 Establish sh as the default shell plugin.
This is a fix for one of the problems pointed out in #14176
2016-02-02 12:19:43 -08:00
53cfde5096 better fix for ansible-pull inventory handling
now it mirrors what it did in previous versions
and properly uses inventory and limit options
2016-02-02 14:29:47 -05:00
6c9d2cc2b4 Note the dnf fix 2016-02-02 10:51:41 -08:00
4de1e26d5c Update submodule refs 2016-02-02 10:49:20 -08:00
8ac8f4c2ab make executable setting connection dependant
winrm shoudl not use executable, rest should?
fixes #14233
2016-02-02 10:22:09 -08:00
5035e53e80 Revert "load now does not modify the incomming data"
This reverts commit 2126e9fee1.
we judge this to be too big a change for stable, keeping in devel
we may still add part or all back to stable in the future.
2016-02-02 11:22:41 -05:00
2126e9fee1 load now does not modify the incomming data
also removed json loader as yaml loader can do both
2016-02-02 11:22:26 -05:00
93cab88663 Don't mark host as having gathered facts when peeking at next task
Fixes #14243
2016-02-02 11:12:28 -05:00
c5f857ec39 Make sure setup tasks inherit properly from their parent play
Fixes #13602
2016-02-02 11:12:24 -05:00
07dd83bc6e deprecate all bare variable conversions (not debug)
now deprecation message appears with variable name in all spots where this occurs
debug's var= option is excluded as this is only place where bare variables shold actually
be accepted.
2016-02-02 00:01:47 -05:00
acb556b3d4 fix incorrect environment processing
it was assumed it could only be a dict or string (it starts out as a list)
also a 2nd assumption that bare vars only would appear in one of the dict keys.

removed deprecation warnings from here as they should be signaled in the bare conversion itself.
2016-02-02 00:01:36 -05:00
48b20684f2 normalize error message on src != dir when local
now action plugin returns same error as module
2016-02-01 13:44:01 -05:00
d7a6ccc4c2 Use isinstance type checks in bool filter so we can handle unsafe proxy objects. Fixes #14240 2016-02-01 12:34:13 -06:00
7f2bc082fa harcoding inventory/hosts when pulling from repo
return to pre 2.0 behaviour which did not factor inventory into the repo pull
2016-01-30 11:39:51 -05:00
d975f32243 added back --profile to keep backwards compat
this was broken by #12548
2016-01-30 11:36:37 -05:00
e8e388a742 Some attributes of callbacks aren't in v2. Port plugins to the v2 way to do that
Update porting guide with info on callback porting
2016-01-30 08:18:19 -08:00
a6c25f143a Explicitly set validate_certs=False as the boto default is True
Fixes #14089
2016-01-29 16:38:18 -08:00
e957ab5a7f fixed code for v1 callback runtime compatiblity
old exception code obsoleted by exception avoidance
errors on callback produce warnings and don't stop play
2016-01-29 17:01:30 -05:00
46002111bb fix unicode input for template lookup
fixes #14207
2016-01-29 16:46:33 -05:00
05bb1b3cb0 Better "conflicting action statements" message 2016-01-29 18:20:09 +00:00
8d7056220d Fix for SLES 11.4, which has now also an /etc/os-release file. 2016-01-29 09:14:13 -08:00
76c941305b When setting up the local connection for the rsync we need to set the shell as well.
Fixes #13490
2016-01-28 20:32:56 -08:00
48da1b8e85 New release v2.0.1.0-0.1.rc1 2016-01-28 16:39:53 -05:00
1e56daf66c More CHANGELOG updates for 2.0.1 2016-01-28 16:32:19 -05:00
506b0a8b61 New release v2.0.0.2-1 2016-01-28 16:24:01 -05:00
ea1339de18 New release v2.0.0.1-1 2016-01-28 16:24:01 -05:00
d60764bc81 Add more entries to changelog 2016-01-28 13:19:31 -08:00
951fa36fca Return an error when synchronize is used with something other than an ssh connection
Suggested in #2832
2016-01-28 16:05:12 -05:00
43cf527fe7 Don't try to generate retry files if the tqm hasn't been initialized
Fixes #14144
2016-01-28 16:02:54 -05:00
a074ebedbc Make retry file generation not use StringIO 2016-01-28 16:02:23 -05:00
d29dfdc84b Re-implementing the retry file feature for 2.0
Fixes #13944
2016-01-28 16:02:19 -05:00
aac8ea0262 Fix lookup of parent attribute when parent doesn't have the attr
Fixes #14100
2016-01-28 16:02:09 -05:00
3db2073909 Only use os.path.basename if get_file_content returned a value, and ensure that service_mgr has line endings stripped. Fixes #14026 2016-01-28 16:01:43 -05:00
0fddd90f14 Handle the key 'prepared' in the 'diff' result from modules
So far, when a 'diff' dict is returned with module results, it is
checked for 'before' and 'after' texts, which are processed in
_get_diff() by python difflib.  This generates the changes to display
when CLI users specify --diff.

However, some modules will generate changes that cannot easily be
expressed in a conventional diff. One example is the output of the
synchronize module, which presents changed files in a common log format
as in `rsync --itemize-changes`.

Add a check for a diff['prepared'] key, which can contain prepared diff text
from modules.
2016-01-28 16:01:15 -05:00
5fe16bef6f Make sure blocks use their parents dependency chains
Fixes a bug inroduced in fb797a9 where included tasks in a role
were not being executed because the child blocks had no dep chain
set.
2016-01-28 15:59:43 -05:00
86b179d3d7 Allow certain base attributes to be used as role params
Role definitions typically require params to be different from those
which are specified as FieldAttributes on the playbook classes used
for roles, however a certain subset should be allowed (typically those
used for connection stuff).

Fixes #14095
2016-01-28 15:59:43 -05:00
7a8520ac1a Fixing role dependency chain creation
The dep chain for roles created during the compile step had bugs, in
which the dep chain was overwriten and the original tasks in the role
were not assigned a dep chain. This lead to problems in determining
whether roles had already run when in a "diamond" structure, and in
some cases roles were not correctly getting variables from parents.

Fixes #14046
2016-01-28 15:59:43 -05:00
8f7868aead Note bugfix for unicode characters and the pager 2016-01-28 11:48:58 -08:00
9ddb4a985c Changes to convert to unicode at the borders
The module docs and vault changes solve issues where tracebacks can
happen.  The galaxy changes are mostly refactoring to be more pythonic
with a small chance that a unicode traceback could have occurred there
without the changes.  The change in __init__.py when we actually call
the pager makes things more robust but could hide places where we had
bytes coming in already so I didn't want to change that without auditing
where the text was coming from.

Fixes #14178
2016-01-28 11:47:21 -08:00
55db4d9e23 Add squashing fix to the changelog 2016-01-28 11:00:23 -08:00
849def8d6e Squashing was occuring even though pkgs didn't have a template that would be affected by squash
This broke other uses of looping (looping for delegate_to in the
reported bug)

Fixes #13980
2016-01-28 10:58:18 -08:00
c0d6a0c11a Update submodule refs 2016-01-28 09:44:19 -08:00
97cd0bc803 fixed unit test to match new output of become/su 2016-01-27 16:50:06 -05:00
7c7e849a27 fixed issue with vars prompt warning causing error
sometimes display object is not magically available, use it explicitly,
no need to be classmethod anymore
fixes #14147
2016-01-27 16:14:03 -05:00
9eaa5fecc1 fix for so su works in more cases
should not fail anymore on csh, fish nor the BSDs
fixes #14116
2016-01-27 14:13:27 -05:00
a0b7620b8e Add fix for 2831 to the changelog 2016-01-26 15:06:37 -08:00
3906614538 Fix for inventory hosts on localhost with alternate ports.
Fixes https://github.com/ansible/ansible-modules-core/issues/2831
2016-01-26 15:05:40 -08:00
03a89e17b9 fixed permissions check for ansible.log
fixes #13990
2016-01-26 11:23:04 -05:00
c52a35ff34 [hotfix] add missed playbook file 2016-01-26 10:45:58 -05:00
16ee2090bd Adding support for scm-based role source urls (incl. integration test to cover it) 2016-01-26 10:45:58 -05:00
7e1a3da97c Add last few major fixes to the 2.0.1 changelog 2016-01-25 20:07:19 -08:00
625e8f2030 Update submodule refs 2016-01-25 19:58:01 -08:00
826f42a153 For synchronize, fix sudo to execute on the remote end of the connection
* In 2.0.0.x become was reversed for synchronize. It was happening on
  the local machine instead of the remote machine. This restores the
  ansible-1.9.x behaviour of doing become on the remote machine.
  However, there's aspects of this that are hacky (no hackier than
  ansible-1.9 but not using 2.0 features).  The big problem is that it
  does not understand any become method except sudo.  I'm willing to use
  a partial fix now because we don't want people to get used to the
  reversed semantics in their playbooks.
* synchronize copying to the wrong host when inventory_hostname is
  localhost
* Fix problem with unicode arguments (first seen as a bug on synchronize)

Fixes #14041
Fixes #13825
2016-01-25 19:55:56 -08:00
1fdf8bca2a python3 doesn't have raw explicit-unicode literals. Workaround it with a raw native string that we make unicode in py2. 2016-01-25 19:48:17 -08:00
6eaf9b9fa2 Transform tracebacks into unicode before printing
Fixes #14042
2016-01-25 19:22:43 -08:00
9a3515357b raise AnsibleError as an 'expected' exception
fixes #14065
2016-01-25 22:21:31 -05:00
cd0812a187 adhoc now respects limit when listing hosts
also removed cruft about localhost as if used it is specified inline
fixes #13848
2016-01-25 17:39:39 -05:00
864c67cec5 ensure stdout callback alwasy is loaded first
it is now called for every event prior to any other callbacks
fixes #14114
2016-01-25 17:13:37 -05:00
7fe91e1848 better error when host inventory script isnt dict 2016-01-25 16:32:57 -05:00
084bacc4a4 add webdocs as alias 2016-01-25 16:32:38 -05:00
e6c9d9c81b Update CHANGELOG.md 2016-01-25 14:42:31 -05:00
0c250f2b07 Use templated handler name during callback
Fixes #14082
2016-01-23 09:26:25 -05:00
a516f883ac convert winrm put_file script template to Unicode string literal
Fixes traceback on homedirs with non-ascii chars
2016-01-22 13:11:02 -08:00
95f7aa2b53 corrected submodule ref 2016-01-22 08:16:53 -05:00
da4a9d6da0 Fix bug with any_errors_fatal where task was not available 2016-01-21 16:41:05 -05:00
d18cc79873 add detect Altlinux distributive 2016-01-21 16:10:53 -05:00
2b3cd2577a Disallow setting state on template tasks
Fixes #14056
2016-01-21 15:37:31 -05:00
50bb0d08f1 Template the run_once value in the linear strategy as we use it there
This is pre-post_validation, so we have to template it on the fly
as we use it to determine if we bypass the host loop.

Fixes #11876
2016-01-21 15:37:25 -05:00
391420d88f Re-add cache clearing call to Inventory init
This prevents a bug where the existing cache outside of the class
is not cleared when creating a new Inventory object. This only really
affects people using the API directly right now, but wanted to fix it
to prevent weird errors from popping up.
2016-01-21 15:37:19 -05:00
4627b3efbb Standardize removal of BECOME-SUCCESS method and use it for async too
Fixes #13965
Fixes #13971
2016-01-21 15:37:10 -05:00
7d8794daa6 plugins/strategy: added significant details to parser error message.
See discussion at
https://github.com/ansible/ansible/issues/13753
2016-01-21 15:37:02 -05:00
2021362386 Fix incorrect handling of any_errors_fatal in the linear strategy
Instead of bombing out of the strategy, we now properly mark hosts failed
so that the play iterator can handle block rescue/always properly.

Fixes #14024
2016-01-21 15:36:27 -05:00
bb564075b5 Forward conditionals onto included plays when conditional eval errors
When using a playbook-level include, we now catch any errors raised during
the conditional evaluation step and set a flag to indicate we need to pass
those conditionals on to the included play (most likely because they contain
inventory variables for evaluation).

Fixes #14003
2016-01-21 15:36:06 -05:00
09b26b6373 Don't assign both parent blocks and task includes to blocks
This causes problems when fetching parent attributes, as the include
was being skipped because the parent block would fetch the attribute
from the parent play first.

Fixes #13872
2016-01-21 15:35:57 -05:00
8647fdc7f2 go back to defaulting wrapping commands in shell
this was taken out in an effort to default to the user's shell but creates issues as this is not known ahead of time
and its painful to set executable and shell_type for all servers, it should only be needed for those that restrict the user
to specific shells and when /bin/sh is not available. raw and command may still bypass this by explicitly passing None.
fixes #13882

still conditional
2016-01-21 15:35:49 -05:00
7fe0bfd4f9 Revert "Properly look for parent become attribute"
This reverts commit 1b46a422aa.
2016-01-21 15:35:35 -05:00
2b5caa23fb Properly look for parent become attribute
Corrects inheritence of the boolean value, which needs some special
consideration from other (string/int) values.

Fixes #13872
2016-01-21 15:35:16 -05:00
0d2a9d3f53 Relocate use of ERROR to display class, to avoid doubling up 2016-01-21 15:35:09 -05:00
34e3a8e6cb Catch INI section parsing misses and raise an appropriate error
Fixes #13917
2016-01-21 15:35:02 -05:00
1fc35117d3 Fix role hashing failure/traceback when params contain lists
Fixes #13857
2016-01-21 15:34:52 -05:00
fb81447581 Don't clear start at task flag until all hosts are advanced
Clearing the flag after the first host was advanced caused all other
hosts to not advance at all.

Fixes #13864
2016-01-21 15:34:23 -05:00
2dfcb218dc Fix with loop + delegate issues
* Don't re-use the existing connection if the remote_addr field of
  the play context has changed
* When overriding variables in PlayContext (from task/variables),
  don't set the same attribute based on a different variable name
  if we had already previously set it from another variable name

Fixes #13880
2016-01-21 15:33:44 -05:00
44ab6db535 Fix any_errors_fatal incorrect implementation in 2.0
Also adds that flag to blocks.

Fixes #13744
2016-01-21 15:32:33 -05:00
d9f03cf014 Update submodule refs to pull in doc fixes 2016-01-21 11:11:32 -08:00
c5e46efbd9 Avoid recursively checking JSON inventory for Unicode
by moving to en-bloc unicode conversion to act on scripts stdout

Both python-json and simplejson always return unicode strings when using
their loads() method on unicode strings. This is true at least since
2009. This makes checking each substring unnecessary, because we do not
need to recursively check the strings contained in the inventory dict
later one-by-one

This commit makes parsing of large dynamic inventory at least 2 seconds
faster.

cf: https://github.com/towolf/ansible-large-inventory-testcase
2016-01-21 08:43:52 -08:00
92579eb48f avoid shredding empty files, also x/0
also cleaned up unused import and exception var
2016-01-21 10:56:24 -05:00
d56e2fb80e corrected host/group match in inventory_hostnames
now the lookup works when using ! and & operators
fixes #13997
2016-01-20 18:33:00 -05:00
1f930f098f Update core submodule to bring in yum fix 2016-01-20 12:18:03 -08:00
63404821da rework run_command's env setting to not change os.environ for the rest of the module.
New param to run_command to modify the environment for just this invocation.
Documentation and comment adjustments.
2016-01-20 12:17:14 -08:00
cf75521bc8 updated submodule refs 2016-01-20 15:02:04 -05:00
50d34f90e7 clarified with_file 2016-01-19 21:20:54 -05:00
089f17bfc8 Don't tracback trying to retore settings
Can occur if we exit the timeout before the settings were changed
2016-01-19 14:11:16 -08:00
27bf701260 Set decoding of path to unicode to raise an exception if non-utf8
Letting it pass would just cause an error later on (no such file found)
so it's better to catch it here and know that we have users dealing with
non-utf8 pathnames than to have to track it down from later on.
2016-01-19 05:50:46 -08:00
299e42bc28 Make all parts of messages and pathnames into unicode so that we don't get UnicodeError tracebacks.
Note that the fix for display normalizing to unicode is correct but the
fix for pathnames is probably not.  Changing pathnames to unicode type
means that we will handle utf8 pathnames fine but pathnames can be any
sequence of bytes that do not contain null.  We do not handle sequences
of bytes that are not valid utf8 here.  To do that we need to revamp the
handling of basedir and paths to transform to bytes instead of unicode.
Didn't want to do that in 2.0.x as it will potentially introduce other
bugs as we find all the places that we combine basedir with other path
elements.  Since no one has raised that as an issue thus far so it's not
something we need to handle yet.  But it's something to keep in mind for
the future.

To test utf8 handling, create a utf8 directory and run a playbook from
within there.

To test non-utf8 handling (currently doesn't work as stated above), create
a directory with non-utf8 chars an run a playbook from there.  In bash,
create that directory like this: mkdir $'\377'

Fixes #13937
2016-01-19 05:45:56 -08:00
2f40903397 clarify role include paths 2016-01-19 08:48:55 -05:00
2ec31c2c79 fixed exception handling to be 2.4 compatible
previous 'fix' broke on 2.4
2016-01-19 08:33:37 -05:00
7afd8e9640 added missed ec2_vpc_net_facts 2016-01-18 22:06:05 -05:00
93781e0b05 be consistent about conversion to_str 2016-01-18 21:56:09 -05:00
edff4a9219 updated submodule refs 2016-01-18 21:15:30 -05:00
69b8a48ed1 Turn results that come from traceback messages into unicode, not str.
Fixes #13964
Fixes #13967
2016-01-18 14:44:57 -08:00
8f45660398 Update submodule refs 2016-01-18 13:59:46 -08:00
c8ffe94bf4 Fix proposed by @Yannig to fix become success detection when the output is multiline
See the Bug report for a specific error case with local connection,
sudo, and the raw module

Fixes #13728
2016-01-18 13:52:23 -08:00
c06b2e4622 correctly deals with non serializable type
combine_vars shoudl really be data types, but some just get in
in test, add dict to mock and avoid combine_vars using object
2016-01-18 15:18:18 -05:00
1394cdf6b9 Fix set_fact + run_once to assign variables to all hosts in the list
Fixes #13921
2016-01-18 11:55:39 -08:00
38a272b004 Allow module args as k=v pairs when using the module: option with local_action
This task format is valid in 1.x, but was broken in 2.x:
  - local_action:
     module: shell echo "hello world"
2016-01-18 11:55:30 -08:00
97a5804a2c Minor cleanup when reassigning play context to reused connections
* Relocate the assignment of the host address to the remote_addr field
  in the play context, which was only done when the connection was created
  (it's now done after the post_validate() is called on the play context)
* Make the assignment of the play context to the connection an else, since
  it's not required if the connection is not reused
2016-01-18 11:55:21 -08:00
8436a88b5d Fixes #13763 Update connections _play_context on every iteration
If this isnt updated, the _connection is reused, and thus has an outdated _play_context
This results in outdated `success_key` and `prompt` causing issues if sudo is run in a loop
Refer to the issue #13763 for more debugging and details
2016-01-18 11:55:12 -08:00
0bf20fab84 Fix erroneous fetch fail when fail_on_missing is set to False
Fixes #13832
2016-01-15 16:29:04 -08:00
22272fe5b8 Fix typos. 2016-01-15 15:10:44 -05:00
7d8afbd83d fix issue with add_hosts overwriting existing vars
fixes github.com/ansible/ansible-modules-core/issues/2799 and is alternative to #13841
2016-01-15 14:27:15 -05:00
f11e54bcff update core submodule ref 2016-01-15 09:36:08 -08:00
46a3a6a03e Non-newstyle modules can't use pipelining
This is because we pass arguments to non-newstyle modules via an
external file.  If we pipeline, then the interpreter thinks it has to
run the arguments as the script instead of what is piped in via stdin.
2016-01-14 17:24:25 -08:00
e29ae99b50 overwrite/merge not remove prev inventory data 2016-01-14 18:42:10 -05:00
363b74e498 Allow Ansible to return error with unicode within it.
Fix for https://github.com/ansible/ansible/issues/13899
2016-01-14 15:07:19 -08:00
17b60f4fbf Fix typo in 0b86aa6 2016-01-14 16:49:46 -05:00
b89f211ed4 Hack to work around callback API change for v2_playbook_on_start 2016-01-14 16:49:46 -05:00
cde5d8444d When setting fail state skip RESCUE/ALWAYS if cur_block doesn't have them
Fixes #13749
2016-01-14 15:59:40 -05:00
6cf0386a52 Tweak how strategies evaluate failed hosts via the iterator and bug fixes
* Added additional methods to the iterator code to assess host failures
  while also taking into account the block rescue/always states
* Fixed bugs in the free strategy, where results were not always being
  processed after being collected
* Added some prettier printing to the state output from iterator

Fixes #13699
2016-01-14 15:59:40 -05:00
b09f756195 now combine vars errors dump vars
very hard to debug w/o knowing what vars were being merged at the time of the error
2016-01-14 11:00:54 -05:00
27f9b9dc43 md5 now uses smaller salt
fixes #13891
2016-01-14 11:00:34 -05:00
31a951c4f7 only send event if tqm exists
fixes #13843
2016-01-14 11:00:18 -05:00
fe55e87ab4 Prevent traceback.
https://github.com/ansible/ansible/issues/13743#issuecomment-171520585

In some circumstance, the file fails to open.  When that occurs, we
can't try to close it in the finally clause.  Using a context manager is
the cleanest way to change the code to account for that case.
2016-01-13 20:52:22 -08:00
2ed31fc818 Add python-setuptools to the requirements for running ansible as
python-setuptools contains the egginfo needed to make pkg_resources
work.
2016-01-13 17:22:43 -08:00
be087575cc Fix circular import 2016-01-13 14:05:24 -08:00
79931041e2 do_encrypt import needed to move as well
Fixes #13861
2016-01-13 13:09:19 -08:00
832a739331 use integer division instead of floating point division.
Fixes #13855
2016-01-13 12:35:44 -08:00
b83ef89f09 Add windows/unix newline change to the changelog 2016-01-13 08:49:48 -08:00
419bd389d8 move core submodule ref for win_msi fix 2016-01-12 09:38:34 -08:00
e497e2b5c0 made loading of galaxy data files lazy 2016-01-12 12:28:47 -05:00
16ae952888 re-adding the dummy debian changlog entry for packaging 2016-01-12 12:20:23 -05:00
954eba8605 added galaxy data
not tested, but something like this seems to be missing in the Manifest.in
2016-01-12 11:31:54 -05:00
e4b701c00a added module name to missing interpreter error
fixes #13816
2016-01-12 11:26:18 -05:00
21c22a2416 Allow InventoryScript JSON with childgroups only
and without hosts and vars

Without this patch, the simplified syntax is triggered when a group
is defined like this:

    "platforms": {
        "children": [
            "cloudstack"
        ]
    }

Which results in a group 'platforms' with 1 host 'platforms'.

more details in https://github.com/ansible/ansible/issues/13655
2016-01-12 11:26:11 -05:00
4e98cc351c Update submodule refs so that new integration tests will pass 2016-01-12 08:02:47 -08:00
f53cb5f63e Integration tests for https://github.com/ansible/ansible-modules-core/pull/558 2016-01-12 08:02:05 -08:00
1cae019c79 cloudstack: fix case insensitivity
cloudstack: fix has_change reports changed for case insensitivity values
2016-01-12 08:02:05 -08:00
f3470c1062 cleaner implementation and random chunk length. 2016-01-12 08:02:05 -08:00
21a4c1380c use unix shred if possible, otherwise fast custom impl; do not shred encrypted file 2016-01-12 08:02:05 -08:00
4811504a6e add docs, remove unnecessary int() cast 2016-01-12 08:02:05 -08:00
08fee9bfc5 add os.fsync() so that the shredding data (hopefully) hits the drive 2016-01-12 08:02:05 -08:00
2cb2994371 shred ansible-vault tmp_file. Also when editor is interruped. 2016-01-12 08:02:05 -08:00
2eb59bedcf New release v2.0.0.0-1 2016-01-12 08:43:33 -05:00
14bf6b016c Split up comma-separated tags properly
Fixes #13795
2016-01-12 08:18:37 -05:00
28fecc9ce1 bugfix in nxos shared module for including defaults 2016-01-11 22:49:01 -05:00
2c647f18e5 bugfix in ios shared module for including defaults 2016-01-11 22:48:54 -05:00
4e087bb14f bugfix in eos shared module for including defaults 2016-01-11 22:48:43 -05:00
1f7fbf29f9 updated new windows module list in changelog 2016-01-11 16:24:30 -08:00
0681c2fd8f deletes nxapi from shared modules
The nxapi module has been superseded by the nxos shared module and is not longer needed. This commit removes (deletes) nxapi from module_utils.  All custom modules that have used nxapi should be using nxos instead.
2016-01-10 15:13:18 -05:00
4a6235e320 adds network config file parser to shared modules
This commit adds a new shared module that parses network device configuration
files.  It is used to build modules that work with the various supported
network device operating systems
2016-01-10 15:12:45 -05:00
94f13c7271 adds shared module shell for creating cli based transports
This commit add a new shared module shell that is used to build connections
to network devices that operate in a CLI environment.  This commit supercedes
the issh.py and cli.py commits and removes them from module_utils.
2016-01-10 15:12:29 -05:00
93eb60161c initial add of openswitch shared module
This commit adds a new shared module openswitch for building modules that
work with OpenSwitch.  This shared module supports connectivity to
OpenSwitch devices over SSH, CLI or REST.  It also adds an openswitch
documentation fragment for use in modules
2016-01-10 15:12:15 -05:00
2f1fc85002 adds shared module nxos for building cisco nxos modules
This commit refactors the nxapi into a new shared module nxos that supports
connectivity over both ssh (cli) and nxapi.  It supercedes the nxapi shared
module and removes it from module_utils.  This commit also adds a
documentation fragement supporting the nxos shared module
2016-01-10 15:12:05 -05:00
91f35363a2 adds new iosxr shared module for developing modules that work with IOS XR devices
This commit adds a new shared module for working with Cisco IOS XR devices over
CLI (SSH).  It also provides a documentation fragement for the commmon arguments
provided by the iosxr module.
2016-01-10 15:11:55 -05:00
f76633b347 updates the ios shared module with new shell
This update refactor the ios shared module to use the new shell shared
library instead of issh and cli.  It also adds the ios documentation
fragment to be used when building ios based modules.
2016-01-10 15:11:37 -05:00
9c9bfb962e initial add of eos shared module
This adds a shared module for communicating with Arista EOS devices over
SSH (cli) or JSON-RPC (eapi).  This modules replaces the eapi.py module
previously added to module_utils.  This commit includes a documentation
fragment that describes the eos common arguments
2016-01-10 15:11:08 -05:00
0e27fa4540 restructure vars_prompt and fix regression
pushed it to use the existing propmpt from display and moved the vars prompt code there also for uniformity
changed vars_prompt to check extra vars vs the empty play.vars to restore 1.9 behaviour
sipmlified the code as it didn't need to check for syntax again (tqm is made none prior based on that)
fixes #13770
2016-01-08 17:56:13 -05:00
3a972c9170 Restore ability for a module to specify WANT_JSON 2016-01-08 12:49:08 -05:00
91c7691a92 noted that regex_escape was added in 2.0
fixes #13759
2016-01-07 19:02:08 -05:00
502ad88506 New release v2.0.0-0.9.rc4 2016-01-07 13:41:47 -05:00
80f0380312 Fix typo 2016-01-07 06:01:44 -08:00
a8f160d2fd More fixes for unicode handling in the connection plugins.
Tested that ssh, docker, local, lxc-libvirt, chroot all work with the
updated unicode integration test.
2016-01-07 06:01:34 -08:00
6be48dd14c Revert "Show version without supplying a dummy action"
This reverts commit 21775d7866.
Parsing before action will fail if one of the action specific options is used
As per issue #13743
2016-01-07 08:29:43 -05:00
fcd074d40f Merge branch 'ktosiek-fix-playbook-hanging' into stable-2.0 2016-01-06 14:01:35 -05:00
21775d7866 Show version without supplying a dummy action
fixes #12004
parsing x2 does not seem to break anything
2016-01-06 11:54:19 -05:00
ab536c8aa8 Strip string terms before templating
The earlier code did call terms.strip(), but ignored the return value
instead of passing that in to templar.template(). Clearly an oversight.
2016-01-06 11:25:55 -05:00
93f37f5969 Don't drop noops from task counting code in linear strategy 2016-01-06 09:58:20 -05:00
ec3b7b7de8 linear strategy: don't look at tasks from the next block 2016-01-05 21:49:08 +01:00
7a4914aa9b Fix exception catching to be importable on python3 2016-01-05 12:04:22 -08:00
9ca5da82ff move hostvars.vars to vars
this fixes duplication under hostvars and exposes all vars in the vars dict
which makes dynamic reference possible on 'non hostvars'
2016-01-05 14:36:21 -05:00
3d608ef9fa simplified diff handling in callback
no need for the copy or other complexity
2016-01-05 14:27:33 -05:00
c14e099dd7 now handles 'non file diffs'
this allows modules to pass back a 'diff' dict and it will still show using the file interface
2016-01-05 14:27:33 -05:00
7e318e8398 Update extras submodule ref 2016-01-05 07:52:44 -08:00
add2e9cbd1 Fix problems with non-ascii values passed as part of the command to connection plugins
@drybjed discovered this with non-ascii environment variables and
command line arguments to script and raw module.
2016-01-05 07:46:24 -08:00
9f93c9c84b Clean up debug logging around _low_level_execute_command
We were logging the command to be executed many times, which made debug
logs very hard to read. Now we do it only once.

Also makes the logged ssh command line cut-and-paste-able (the lack of
which has confused a number of people by now; the problem being that we
pass the command as a single argument to execve(), so it doesn't need an
extra level of quoting as it does when you try to run it by hand).
2016-01-05 07:46:13 -08:00
b4e0b5503c move core submodule pointer 2016-01-04 16:10:29 -08:00
5536ddd118 Do not set 'changed' to True when using group_by
Since group_by is not changing in any way to the remote
system, there is no change. This also make things more consistent
with the set_fact plugin.
2016-01-04 16:23:25 -05:00
021ed1aa8b Replace to_string by to_unicode.
Fix https://github.com/ansible/ansible/issues/13707
2016-01-01 08:18:18 -08:00
a703f3a6d2 added newer vars to 'reset_vars'
these vars pass back info to the task about the connection
moved to their own block at start at file for readability and
added the newer standard vars
2015-12-28 12:50:04 -05:00
f7ea8b32a9 minor fix to become docs 2015-12-28 10:25:35 -05:00
ba7d2db8ad clarify idempotence explanation
Small typo; wasn't sure what to replace it with.
2015-12-28 10:24:55 -05:00
b50ed10a84 updated release cycle to 4 months instead of 2 2015-12-27 14:17:58 -05:00
b4fae25a96 CHANGELOG entry for bigip* validate_certs change 2015-12-25 12:24:19 -08:00
6142736946 Oops, core needs to stay on stable-2.0 2015-12-25 12:16:18 -08:00
25fc4217df Update submodule refs 2015-12-25 12:15:49 -08:00
d71e8fb870 bigip changes as requested by bcoca and abadger:
* Fix to error if validate_cert is True and python doesn't support it.
* Only globally disable certificate checking if really needed.  Use
  bigip verify parameter if available instead.
* Remove public disable certificate function to make it less likely
  people will attempt to reuse that
2015-12-25 12:15:24 -08:00
369ed9feed cloudstack: test_cs_instance: more integration tests
cloudstack: extend test_cs_instance addressing recovering

cloudstack: test_cs_instance: add tests for using display_name as indentifier.
2015-12-23 17:48:49 -08:00
ebd3b35d02 Update submodule refs 2015-12-23 14:29:36 -08:00
82df9041e7 Going to do this in the connection plugin
Revert "Transform the command we pass to subprocess into a byte string in _low_level-exec_command"

This reverts commit 6d76cb40c5.
2015-12-23 13:28:42 -08:00
dd59fc176e Going to do this in the connection plugin
Revert "Fix make tests-py3 on devel. Fix for https://github.com/ansible/ansible/issues/13638."

This reverts commit 725e40c5e6.
2015-12-23 13:28:42 -08:00
9af054addf Going to do this in the connection plugin
Revert "Convert to bytes later so that make_become_command can jsut operate on text type."

This reverts commit bfc082fb07.
2015-12-23 13:28:42 -08:00
7f29cb9dc6 corrected role path search order
the unfraking was matching roles in current dir as it always returns a full path,
pushed to the bottom as match of last resort
fixes #13645
2015-12-23 15:15:58 -05:00
2786908bac fixed tests to follow new invocation structure
also added maxdiff setting to see issues clearly when they happen
2015-12-23 11:45:50 -05:00
43331d8c31 better module error handling
* now module errors clearly state msg=MODULE FAILURE
* module's stdout and stderr go into module_stdout and module_stderr keys
which only appear during parsing failure
* invocation module_args are deleted from results provided by action
plugin as errors can keep us from overwriting and then disclosing info that
was meant to be kept hidden due to no_log
* fixed invocation module_args set by basic.py as it was creating different
keys as the invocation in action plugin base.
* results now merge
2015-12-23 10:59:01 -05:00
579a2ff739 fix no_log disclosure when using aliases 2015-12-22 17:17:06 -05:00
bfc082fb07 Convert to bytes later so that make_become_command can jsut operate on text type.
Conflicts:
	lib/ansible/plugins/action/__init__.py
2015-12-22 08:33:36 -08:00
725e40c5e6 Fix make tests-py3 on devel. Fix for https://github.com/ansible/ansible/issues/13638. 2015-12-22 08:33:36 -08:00
8216a659fa Also convert ints to bool for type=bool 2015-12-22 10:25:25 -05:00
a2120a3d63 Version bump for 2.0.0-0.8.rc3 2015-12-21 17:59:27 -05:00
6d76cb40c5 Transform the command we pass to subprocess into a byte string in _low_level-exec_command 2015-12-21 13:55:06 -08:00
b0e7ea78af Actually disable parallel makes for integration runner 2015-12-21 16:12:27 -05:00
6a0d2116b8 Delete new_inventory from stable-2.0 as it isn't used there.
leaving in devel for now as some people are planning on using it as
a starting place to update inventory in 2.1
2015-12-21 13:11:16 -08:00
37908735d4 Dropping instance size back down since we're not doing parallel builds 2015-12-21 15:55:16 -05:00
c0248873da Integration test runner tweaks 2015-12-21 15:53:19 -05:00
75695f5c70 Kick up the integration runner test image size 2015-12-21 15:53:19 -05:00
0a6bc57fa5 Parallelize make command for integration test runner
Also adds a new var, used by the prepare_tests role, to prevent it from
deleting the temp test directory at the start of each play to avoid any
potential race conditions
2015-12-21 14:09:02 -05:00
1d18964daa Merge role params into variables separately from other variables
Fixes #13617
2015-12-21 13:55:17 -05:00
8eb3963cd9 Adding documentation for the 'dig' lookup (#13126). 2015-12-21 13:49:49 -05:00
c605cd37f6 allow for non standard hostnames
* Changed parse_addresses to throw exceptions instead of passing None
* Switched callers to trap and pass through the original values.
* Added very verbose notice
* Look at deprecating this and possibly validate at plugin instead
fixes #13608
2015-12-21 13:42:47 -05:00
e1698fb4bf role search path clarified 2015-12-21 13:16:48 -05:00
81f09f3fbd Disable docker test for Fedora, due to broken packaging 2015-12-21 10:58:49 -05:00
b77d834239 Uncomment docker test for stable-2.0 2015-12-21 10:58:35 -05:00
7607e55a5a Save output of integration test results to files we can archive 2015-12-21 10:58:02 -05:00
d512717cd2 Fix logic in PlayIterator when inserting tasks during rescue/always
Because the fail_state is potentially non-zero in these block sections,
the prior logic led to included tasks not being inserted at all.

Related issue: #13605
2015-12-21 10:57:24 -05:00
ce17557b84 Fixed import typo for memcache module in tests.
The typo caused the test for the memcached cache plugin to be skipped
even when the necessary memcache python module was installed.
2015-12-21 10:27:36 -05:00
80e109e1ad And change the task a little more since different shlex versions are handling the quotes differently 2015-12-20 11:52:50 -08:00
fdc562e3c3 Fix test playbook syntax 2015-12-20 11:47:17 -08:00
1dcfd7ba02 Since the velox test server seems to be dropping using iptables to drop requests from aws, test via a different website instead 2015-12-20 11:38:54 -08:00
9cfa2d7e28 Fixing bugs in conditional testing with until and some integration runner tweaks 2015-12-20 12:45:33 -05:00
5bd01c09d6 Troubleshooting has reduced us to this 2015-12-20 12:45:28 -05:00
61bd0e1310 Fix the fedora host detection 2015-12-20 12:45:09 -05:00
bb1047c483 What is going on here 2015-12-20 12:45:03 -05:00
c2a29a01a2 Removing update all for test deps, it didn't fix the problem 2015-12-20 12:44:20 -05:00
6a1ebaa1bc Fix typo in integration test runner role 2015-12-20 12:44:10 -05:00
1d1a04008e Update mysql setup to handle installing mysql with dnf too. 2015-12-20 12:43:47 -05:00
1cde02058f Make integration tests run in parallel with async 2015-12-20 12:41:53 -05:00
48675550bf Try updating the centos7 image to a newer version (trying to resolve issue being unable to connect to some webservers) 2015-12-20 09:13:03 -08:00
3955ea5a8a Fixes for tests that assumed yum as package manager for systems that
have dnf
2015-12-20 08:11:05 -08:00
454c8ff5b8 Switch from yum to package when installing sudo so that dnf is handled as well 2015-12-20 08:10:58 -08:00
ba0b4afb6b Revert "removed invocation info as it is not no_log aware"
This reverts commit 6127a8585e.
2015-12-19 15:51:29 -08:00
76507bd567 Make return invocation information so that our sanitized copy will take precedence over what the executor knows. 2015-12-19 15:51:22 -08:00
d2bf615780 Fix unittests for return of invocation from fail_json and exit_json 2015-12-19 15:50:43 -08:00
3840fb267c corrected service detection in docker versions
now if 1 == bash it falls back into tool detection
2015-12-19 16:16:28 -05:00
fbccfc8b61 Add package module to squash list 2015-12-19 13:01:48 -08:00
2d179b376b Remove args from get_name() as we can't tell if any of the args are no_log 2015-12-19 11:51:51 -08:00
a0add9dda5 Comment to explain why we strip _ansible_notify specially 2015-12-19 11:32:31 -08:00
de9517dcc8 Also need redhat-rpm-config to compile pycrypto 2015-12-19 11:27:55 -08:00
bef2b70eae Make sure that yum is present on redhat family systems (makes things also work on fedora systems where dnf is the default) 2015-12-19 11:24:27 -08:00
df08ba37fe removed invocation info as it is not no_log aware
This was added in 1.9 and 2.0 tried to copy, but since it cannot
obey no_log restrictions I commented it out. I did not remove as
it is still very useful for module invocation debugging.
2015-12-19 11:45:59 -05:00
6dc42e376f update submodule refs 2015-12-18 22:18:25 -08:00
9689f00bb1 Add a Fedora latest host into the mix 2015-12-18 22:15:29 -08:00
2f0e8d9654 Make integration runner ec2 add_hosts use valid host names 2015-12-18 16:04:54 -08:00
6d9235e36d Fix the fedora host detection 2015-12-18 15:43:39 -08:00
eb606cc18b What is going on here 2015-12-18 15:43:32 -08:00
85ef768d51 Bugfix the fedora 23 install task 2015-12-18 14:39:27 -08:00
457e32128f Ubuntu images with hvm ssd 2015-12-18 14:39:20 -08:00
e8ce341f9c Fedora 23 needs to have python2 packages installed 2015-12-18 14:08:43 -08:00
87214005d2 Make tests that use kennethreitz retry. 2015-12-18 11:51:16 -08:00
dc0a4e74d6 added note about add_hosts 2015-12-18 13:57:58 -05:00
43409fa16c added missing features to changelog 2015-12-18 12:15:08 -05:00
b912923ef2 Do a full yum update to make sure packages are latest version
For the deps setup of integration tests, as we sometimes see odd
errors we can't reproduce, which may be related to slightly out of
date package dependencies.
2015-12-18 08:51:57 -08:00
46bc8253e1 Add awk to integration test deps list 2015-12-18 08:51:42 -08:00
1f70fc6424 Add state=latest to pip install of pycrypto 2015-12-18 08:51:34 -08:00
ed4ad5f6fb Add ca-certificates update to the integration deps playbook 2015-12-18 08:51:25 -08:00
69eb22c652 Install an updated version of pycrypto on Ubuntu12 from pip 2015-12-18 08:51:14 -08:00
dca880d04a kennetreitz.org times out but www.kennethreitz.org is fine 2015-12-18 08:34:07 -08:00
0c6364c771 debug line needs var not msg 2015-12-18 08:33:55 -08:00
c9cf07e3b5 Fixing bugs with {changed,failed}_when and until with registered vars
* Saving of the registered variable was occuring after the tests for
  changed/failed_when.
* Each of the above fields and until were being post_validated too early,
  so variables which were not defined at that time were causing task
  failures.

Fixes #13591
2015-12-18 11:08:06 -05:00
bcd66059ae Use --source instead of -e for awk in integration Makefile 2015-12-17 20:53:43 -05:00
72e6dbcd12 Fix get_url tests in light of distros backporting SNI support 2015-12-17 17:53:38 -08:00
184c2985fc Consolidating package lines for virtualenv install in test deps integration 2015-12-17 17:46:12 -05:00
4abbe8a989 Moving apt cache update to top to ensure cache is updated before deps installed 2015-12-17 17:46:12 -05:00
ce159ce2eb Switch virtualenv dep installation from pip to package manager 2015-12-17 17:46:12 -05:00
fdb94b9a7a Adding pip install of virtualenv to test deps integration role 2015-12-17 17:45:59 -05:00
be0e826091 remove .gitignore 2015-12-17 14:18:12 -08:00
f12ed5eba8 symbolic link role for testing 2015-12-17 14:18:06 -08:00
b1d5e9ff3c removed ansible_python_interpreter
* added missed renames of ansible_deps to ansible_test_deps
* removed acidential inventory.dynamic file
* modified README for ansible_test_deps role
2015-12-17 14:17:58 -08:00
dcb732b416 rename role ansible_deps to ansible_test_deps 2015-12-17 14:17:49 -08:00
ad6ec9610e playbook that Ansible jenkins runs moved into core
The playbook is already running in jenkins and works. This moves the
assets into core for ease of maintenance going forward.
2015-12-17 14:17:41 -08:00
fcceac5ff2 trigger jenkins integration tests 2015-12-17 14:17:35 -08:00
0a319a28f2 Update submodule for mysql_user fix 2015-12-17 13:47:07 -08:00
17fe156016 Fixing a mistake from tweaking list stuff too much
Use the action only if the task name is not set
2015-12-17 16:34:03 -05:00
5824a6d9bb Further tweaks to the output format of list tasks/tags 2015-12-17 16:31:02 -05:00
59cac03d3b Make --list-tasks respect tags
Also makes the output closer to the appearance of v1

Fixes #13260
2015-12-17 16:11:00 -05:00
cc2e0c1e3d Update submodule to pull in mysqldump fix 2015-12-17 13:02:11 -08:00
624556eb16 Add recent bugfixes to changelog 2015-12-17 10:35:24 -08:00
64737c80f9 Update submodule refs 2015-12-17 10:21:50 -08:00
5e9d182229 changed test to use filter for accurate reporting 2015-12-17 12:28:17 -05:00
1f7ed5d8ee Fix handling of environment inheritence, and template each inherited env
Environments were not being templated individually, so a variable environment
value was causing the exception regarding dicts to be hit. Also, environments
as inherited were coming through with the tasks listed first, followed by the
parents, so they were being merged backwards. Reversing the list of environments
fixed this.
2015-12-17 09:46:41 -05:00
f41dd578b3 Make sure we're using the original host when processing include results
Also fixes a bug where we were passing an incorrect number of parameters to
_do_handler_run() when processing an include file in a handler task/block.

Fixes #13560
2015-12-16 19:13:03 -05:00
407d76b8d5 Fixing template integration test for python 2.6 versions
No longer immediately fallback to to_json if simplejson is not installed
2015-12-16 18:24:12 -05:00
d2c43c421f Update core module ref for mysql_user fix 2015-12-16 14:10:00 -08:00
6c509b5364 Updating the porting guide to note the complex args/bare vars change
Related to #13518
2015-12-16 16:37:55 -05:00
4bce9947e5 fixed formating issues with rst 2015-12-16 16:37:55 -05:00
4ad7135690 Add first draft of porting guide for 2.0 2015-12-16 16:37:55 -05:00
bf9f6ce09c All variables in complex args again
Also updates the CHANGELOG to note the slight change, where bare variables
in args are no longer allowed to be bare variables

Fixes #13518
2015-12-16 16:37:55 -05:00
84a6b543a9 ensure additional args are a dict
They should already be templated before hitting this point?
otherwise the class needs the task variables passed into it.
relates to #13518 and  https://groups.google.com/forum/#!msg/ansible-project/esoBcphHwHs/Ghgi_M-MCQAJ
2015-12-16 15:32:26 -05:00
6cf7b792a3 Fix docs. The search command works with both galaxy.ansible.com and galaxy-qa.ansible.com. 2015-12-16 15:11:45 -05:00
abec9331d8 Fixed documentation typos and bits that needed clarification. Fixed missing spaces in VALID_ACTIONS. 2015-12-16 15:11:41 -05:00
ba16f2ae95 Add a section to intro_configuration for Galaxy. 2015-12-16 15:11:34 -05:00
1e605d727c Define and handle ignore_certs correctly. Preserve search term order. Tweak to Galaxy docsite. 2015-12-16 15:11:30 -05:00
6c48d52b4a Make sure it is clear that new commands require using the Galaxy 2.0 Beta site. 2015-12-16 15:11:26 -05:00
8bb598daa2 Updated ansible-galaxy man page. Removed -b option for import. 2015-12-16 15:11:22 -05:00
21edd6a5ab Fix overloaded options. Show an error when no action given. Don't show a helpful list of commands and descriptions. 2015-12-16 15:11:05 -05:00
e10e03f4d9 added releases doc 2015-12-16 15:10:48 -05:00
d5bdea0bab fix plugin loading for Windows modules
force plugin loader to only consider .py files, since that's the only place docs can live ATM...
2015-12-16 11:47:52 -08:00
cd1bdaa61d Update submodule refs for mysql refactor 2015-12-16 11:14:39 -08:00
9f69b6b585 Add shared connection code for mysql modules 2015-12-16 11:06:21 -08:00
9e52a7c769 Attempt at fixing strategy unit test failures on py2.6 and py3 2015-12-16 13:57:13 -05:00
8fd438000a Update url to site that has an invalid certificate 2015-12-16 09:47:56 -08:00
54ce8327cb Disabling docker test for stable-2.0 due to versioning issues 2015-12-16 11:24:29 -05:00
82519ab2a6 Preserve the cumulative path for checking includes which have parents
Otherwise, each relative include path is checked on its own, rather
than in relation to the (possibly relative) path of its parent, meaning
includes multiple level deep may fail to find the correct (or any) file.

Fixes #13472
2015-12-16 11:23:33 -05:00
5761c333a6 Update submodule ref to fix docs build 2015-12-16 08:13:54 -08:00
72b852a814 Update submodule refs 2015-12-16 08:03:34 -08:00
897569c1ca Conditionally create the CustomHTTPSConnection class only if we have the required baseclasses.
Fixes #11918
2015-12-16 08:02:11 -08:00
8e2cb2abb2 Fixes for proxy on RHEL5 2015-12-16 08:02:03 -08:00
b8d9b106de First attempt to fix https certificate errors through a proxy with python-2.7.9+
Fixes #12549
2015-12-16 08:01:56 -08:00
f68c0043de Fix typo 2015-12-16 10:53:10 -05:00
48fb0cdecb debug now validates its params
simplified var handling
made default message the same as in pre 2.0
fixes #13532
2015-12-16 10:42:30 -05:00
28602cddb0 Use the original host rather than the serialized one when processing results
Fixes #13526
Fixes #13564
Fixes #13566
2015-12-16 01:50:14 -05:00
5011d63f7e Fix a part of python 3 tests (make tests-py3, see https://github.com/ansible/ansible/issues/13553 for more details). 2015-12-15 07:57:05 -08:00
5ab25e2dfe clean debug output to match prev versions 2015-12-15 09:28:39 -05:00
6e1bb6c87d renamed ssh.py shared module file to clarify 2015-12-15 08:44:43 -05:00
ac7dc6bd81 the ssh shared module will try to use keys if the password is not supplied
The current ssh shared module forces only password based authentication.  This
change will allow the ssh module to use keys if a password is not provided.
2015-12-15 08:39:17 -05:00
b6dac26224 Make module_utils.known_hosts.get_fqdn work on ipv6 2015-12-14 11:10:02 -08:00
a7a3a34987 Add tests for ansible.module_utils.known_hosts 2015-12-14 11:09:49 -08:00
6df187da84 Fix for template module not creating a file that was not present when force=false 2015-12-14 10:57:34 -08:00
cf95619229 Optionally only use UUIDs for openstack hosts on duplicates
The OpenStack inventory lists hostnames as the UUIDs because hostsnames
are not guarnateed to be unique on OpenStack. However, for the common
case, this is just confusing.

The new behavior is a visible change, so make it an opt-in via config.

Only turn the hostnames to UUIDs if there are duplicate hostnames.
2015-12-14 13:27:33 -05:00
17a37844d4 Fix the refresh flag in openstack inventory
Refresh will update the dogpile cache from shade, but doesn't cause
the ansible side json cache to be invalidated. It's a simple oversight.
2015-12-14 13:27:33 -05:00
gp
0697c6e59d Fix typo in galaxy.rst
Fix typo
2015-12-14 09:15:15 -08:00
66be9d06c4 Minor: Correct type pyhton => python 2015-12-14 08:51:33 -08:00
62b2c9eb4e Update submodule refs 2015-12-14 08:34:49 -08:00
887319f95c add tests for encrypted hash mysql_user 2015-12-14 08:02:11 -08:00
fc233bf3f4 Use an octal representation that works from 2.4->3+ for known_hosts 2015-12-14 10:44:22 -05:00
8dcba63022 Fixing up some non-py3 things for unit tests 2015-12-14 10:44:22 -05:00
60f5fe76a1 use default settings from ansible.cfg 2015-12-14 09:19:15 -05:00
0b66ec0ddd Cleanup strategy tests broken by new forking strategy 2015-12-14 03:07:51 -05:00
e7bf204db4 A few tweaks to improve new forking code 2015-12-14 03:07:48 -05:00
c8e6461dee Changing the way workers are forked 2015-12-14 01:16:55 -05:00
3214ef8832 added that ansible-pull is now shallow to changelog 2015-12-13 12:18:28 -05:00
6a5444c2fe add --full flag to ansible-pull man page
add --full flag that was added in #13502
2015-12-13 12:17:36 -05:00
d4e06695fd Fix Doc mistake
Fix Doc mistake in ansible/docsite/rst/playbooks_variables.rst
2015-12-13 09:50:45 -05:00
d369e3ec72 fix whitespace 2015-12-13 09:37:48 -05:00
bff8db3c8f make shallow clone the default for ansibel-pull 2015-12-13 09:37:48 -05:00
8c6010cc86 add depth option to ansible-pull
Allows shallow checkouts in ansible-pull by adding `--depth 1` (or higher number)
2015-12-13 09:37:48 -05:00
13ffd3ee2d include all packaging in tarball
not juse rpm spec file
2015-12-13 00:34:56 -05:00
f9bff8e488 simplified skippy
thanks agaffney!
2015-12-12 17:51:25 -05:00
6d83bf8ca9 changed shell delimiters for csh
fixes #13459
2015-12-12 16:13:20 -05:00
17f06dd310 removed unused imports in galaxy/cli 2015-12-12 13:43:46 -05:00
82f893d65a Explain how 'run_once' interacts with 'serial' 2015-12-12 00:33:21 -05:00
40b55eda4c avoid set to unique hosts to preserver order
swiched to using a list comp and set to still unique but keep expected order
fixes #13522
2015-12-11 15:40:48 -05:00
7678ab05d8 removed merge conflict 2015-12-11 15:10:48 -05:00
5b801afa38 Don't mark hosts failed if they've moved to a rescue portion of a block
Fixes #13521
2015-12-11 14:58:38 -05:00
71cc791677 narrow down exception catching in block builds
this was obscuring other errors and should have always been narrow scope
2015-12-11 13:13:19 -05:00
3d1b3e2bb8 removed 'bare' example in environment
now shows how to use explicit templating
2015-12-11 09:35:19 -05:00
b0e5556d9a fix make complaint when git is not installed 2015-12-10 21:50:11 -05:00
75e6fb30d5 Fixing up docker integration tests a bit 2015-12-10 13:10:40 -05:00
9b5ec8f359 Update submodule ref 2015-12-10 08:10:13 -08:00
2dbcd8fc9e become_pass needs to be bytes when it is passed to ssh.
Fixes #13240
2015-12-10 07:30:20 -08:00
82789df231 allow custom callbacks with adhoc cli for scripting
missing import of CallbackBase
2015-12-10 07:05:41 -08:00
3fafc6d655 Missed one place we were appending the incorrectly escaped item to raw params 2015-12-09 17:59:06 -05:00
9b864811f8 Note that handlers inside of includes are not possible at the moment 2015-12-09 13:53:04 -08:00
ba62a8d559 Windows doc updates 2015-12-09 16:36:23 -05:00
b793fbc60a Remove the funcd connection plugin 2015-12-09 13:30:37 -08:00
7e6d546632 added winrm CP notes to changelog 2015-12-09 15:50:37 -05:00
45d2f59858 changed deprecation to removal warning 2015-12-09 12:39:11 -08:00
dd6e10ce43 Update submodule refs 2015-12-09 12:11:30 -08:00
6694e97a31 Make on_file_diff callback item-aware 2015-12-09 14:52:06 -05:00
699bb847a0 reenabled --tree for ansible adhoc command
previous fix to avoid callbacks now conflicted with tree optoin
which is implemented as a callback in 2.0
2015-12-09 10:14:43 -08:00
c02ca22894 adhoc avoids callbacks by default as it did before
Previous emptying of whitelist only affected callbacks that were
constructed for need whitelist. This now works for all callbacks.
2015-12-09 10:03:39 -08:00
1f9d66ef60 Clarify language of delegate_facts documentation 2015-12-09 08:46:49 -08:00
8f6f2fc920 Code smell test for specifying both required and default in FieldAttributes 2015-12-09 08:46:49 -08:00
4d7710806e attribute defaults that are containers are a copy
This is simpler way to prevent persistent containers across instances
of classes that use field attributes
2015-12-09 08:42:14 -08:00
c2665da3e8 removed unused 'pattern' from ansible.cfg
also moved the config param to a 'deprecated' list in constants.py
added TODO for producing a deprecation warning for such vars
2015-12-09 08:42:14 -08:00
186259eb80 removed default from hosts to make it requried
prevents writing a play w/o a hosts entry which would default to
all/empty
2015-12-09 08:42:14 -08:00
e571bf94d4 Revert "avoid persistent containers in attribute defaults"
This reverts commit 87969868d4.
found better way to do it
2015-12-09 08:42:14 -08:00
565b5097da clarified warning from tree callback 2015-12-09 08:40:56 -08:00
0a6f8b2bf3 Galaxy 2.0 2015-12-09 11:30:05 -05:00
f649dc71e7 avoid persistent containers in attribute defaults
moved from the field attribute declaration and created a placeholder
which then is resolved in the field attribute class.

this is to avoid unwanted persistent of the defaults across objects which introduces
stealth bugs when multiple objects of the same kind are used in succession while
not overriding the default values.
2015-12-09 11:11:49 -05:00
d93e1f4ccf added delegate_facts docs 2015-12-08 14:18:11 -08:00
9eb9f55a31 keep string type filters as strings
now we don't try to convert types if using a filter that outputs a specifically formated string
made list of filters configurable
2015-12-08 12:52:44 -08:00
dbcfce03d2 Add ssh_host support for MacOSX El Capitan.
OS X El Capitan moved the /etc/ssh_* files into /etc/ssh/. This fix
adds a distribution version check for Darwin to set the keydir
appropriately on El Capitan and later.
2015-12-08 15:36:49 -05:00
b3cfb630dc Make "make webdocs" compatible with Python 3
The `webdocs` make target fails under Python 3. It fails due to a variety of
syntax errors, such as the use of `except Foo, e` and `print 'foo'`. Fix #13463
by making code compatible with both Python 2 and 3.
2015-12-08 15:31:35 -05:00
058e02137a Preserve original token when appending to _raw_params in parse_kv
Fixes #13311
2015-12-08 15:06:01 -05:00
666cb07614 fixed typo in tree callback, added default dir
this would allow it to work with playbooks also
2015-12-08 11:59:51 -08:00
df04955572 updated with delegate_facts directive 2015-12-08 11:53:36 -08:00
422092b8bc Fix typo from 5ae850c 2015-12-08 14:34:37 -05:00
5ae850c3b2 Make fact delegating configurable, defaulting to 1.x behavior 2015-12-08 14:00:17 -05:00
7c8e1b41bb Revert "Fix always_run support in the action plugin for template when copying"
This reverts commit 45670eff81.
2015-12-08 09:26:24 -08:00
43bfd16666 have always_run override check mode for a task
Fixes #13418
2015-12-08 09:26:13 -08:00
45670eff81 Fix always_run support in the action plugin for template when copying
Fixes #13418
2015-12-08 11:55:35 -05:00
50e5b0f8e9 Merge pull request #13467 from bcoca/adhoc_callbk_fix
adhoc does not load plugins by default
2015-12-08 11:28:20 -05:00
e69064d0fc Merge pull request #13451 from bcoca/doas_fix
fixed doas from getting stuck when needing passwords
2015-12-08 11:13:01 -05:00
1aa775196b adds new device argument to nxapi command arguments
The device argument allows a dict of nxapi parameters to be passed to
the module to simplify passing the nxapi parameters
2015-12-08 10:36:47 -05:00
b07451eef8 adhoc does not load plugins by default
reimplemented feature from 1.x which kept additional callbacks from
poluting adhoc unless specifically asked for through configuration.
2015-12-08 06:37:15 -08:00
cc98528ecb Version bump for 2.0.0-0.7.rc2 2015-12-07 13:13:37 -05:00
f241c70740 corrected usage of ec2.py's profile option
this was never introduced into ansible-playbook though the docs
stated otherwise. We still explain how to use the env var to get the
same result.
2015-12-07 09:56:05 -08:00
2ed2c12f60 Fix issue when var name is the same as content.
See https://github.com/ansible/ansible/issues/13453 for more details.
2015-12-07 10:08:13 -05:00
d85b8adba6 More meaningful string representation for meta tasks (like 'noop' and 'flush_handlers') 2015-12-07 10:08:13 -05:00
8e16b481d0 added extract filter to changelog 2015-12-07 10:08:13 -05:00
d89dbf19fb bugfix for ios.py shared module argument creation
This patch fixes a bug in module_utils/ios.py where the the wrong shared
module arguments are being generated.  This bug prevented the shared module
from operating correctly.  This patch should be generally applied.
2015-12-07 06:59:43 -08:00
40c01f3739 Use self.args when we parse arguments that way the arguments can be constructed manually 2015-12-06 22:19:11 -08:00
71ffa5abdc Add representers so we can output yaml for all the types we read in from yaml 2015-12-06 22:19:02 -08:00
0533e0bc96 fixed doas from getting stuck when needing passwords
Also adjusted test to match new doas become output
fixes #13449
2015-12-06 00:35:28 -05:00
3974b13a5a Make no_target_syslog consistent.
no_target_syslog = False --> do log on target
2015-12-05 16:14:36 -05:00
d04d5bf0d5 only set become defaults at last possible moment
tasks were overriding commandline with their defaults, not with the
explicit setting, removed the setting of defaults from task init and
pushed down to play context at last possible moment.
fixes #13362
2015-12-05 15:59:51 -05:00
8a733d990f simplified get_hosts code to have 1 retrun point 2015-12-05 10:13:09 -05:00
895fc48700 Remove duplicates from host list *before* caching it
Ansible previously added hosts to the host list multiple times for commands
like `ansible -i 'localhost,' -c local -m ping 'localhost,localhost'
--list-hosts`.
8d5f36a fixed the obvious error, but still added the un-deduplicated list to a
cache, so all future invocations of get_hosts() would retrieve a
non-deduplicated list.
This caused problems down the line: For some reason, Ansible only ever
schedules "flush_handlers" tasks (instead of scheduling any actual tasks from
the playbook) for hosts that are contained in the host lists multiple times.
This probably happens because the host states are stored in a dictionary
indexed by the hostnames, so duplicate hostname would cause the state to be
overwritten by subsequent invocations of … something.
2015-12-05 10:13:09 -05:00
2068ff8926 updated pull location in changelog
it was in between of backslash description and example
2015-12-05 01:48:41 -05:00
da6670cca4 Add fullstop to make sentence make sense. Touch parargraph while at it. 2015-12-04 21:35:39 -05:00
d0337a8928 comment examples in default hosts file 2015-12-04 16:02:26 -08:00
4c21d58f4c Transform exceptions into ansible messages via to_unicode instead of str to avoid tracebacks.
Fixes #13385
2015-12-04 11:52:07 -08:00
86ca0bf3b1 Correct connection type returned by libvirt_lxc inventory script
The correct connection type for LXC containers managed via libvirt is
libvirt_lxc, not lxc.
2015-12-04 11:00:37 -08:00
627576a955 Adding a uuid field so we can track host equality across serialization too 2015-12-04 13:34:10 -05:00
3aa4db5083 Update submodule refs 2015-12-04 09:59:30 -08:00
cd76552724 Changing up how host (in)equality is checked
Fixes #13397
2015-12-04 12:58:16 -05:00
f630e140d2 fixed ansible-pull broken options
* sudo was not working, now it supports full become
* now default checkout dir works, not only when specifying
* paths for checkout dir get expanded
* fixed limit options for playbook
* added verbose and debug info
2015-12-03 20:51:51 -08:00
c03b8ef0c2 return unique list of hosts 2015-12-03 19:44:31 -08:00
46718ac3f4 reverted to previous pull checkout dir behaviour
This fixes bugs with not finding plays when not specifying checkout dir
Also makes it backwards compatible
2015-12-03 19:44:31 -08:00
3e5c7c540b corrected playbook path, reformated options help
the last just to make the help consistent and readable
2015-12-03 18:24:10 -08:00
7950f09d19 Now and/or shell expressions depend on shell plugin
This should fix issues with fish shell users as && and || are
not valid syntax, fish uses actual 'and' and 'or' programs.
Also updated to allow for fish backticks pushed quotes to subshell,
fish seems to handle spaces w/o them.
Lastly, removed encompassing subshell () for fish compatibility.
fixes #13199
2015-12-03 16:43:02 -08:00
f8911adbbc For now, skip tests of module_utils/basic functions that are failing on
py3 (these are only run on the target hosts, not on the controller).
2015-12-03 14:26:25 -08:00
6aa1b6d9b1 Properly compare object references for Hosts when adding new ones
Fixes #13397
2015-12-03 15:27:10 -05:00
013ace9ab2 fix sorting of groups for host vars
Fixes #13371
2015-12-03 14:23:14 -05:00
0d0ed35ba4 Properly default remote_user for delegated-to hosts
Fixes #13323
2015-12-03 11:33:11 -05:00
b9fbfaf64e Also some unicode tests for return_values() 2015-12-02 21:12:33 -08:00
2c5c7b54f6 Add some test data that has unicode values 2015-12-02 21:12:26 -08:00
c1aeda59bd Don't compare or merge str with unicode
Fixes #13387
2015-12-02 21:12:18 -08:00
0f813fd76a updated docs for 2.0 api 2015-12-02 12:11:58 -08:00
38c11e2239 Default msg param to AnsibleError to avoid serialization problems 2015-12-02 14:18:13 -05:00
ed4a06d8ef Don't use play vars in HostVars
Fixes #13398
2015-12-02 14:18:13 -05:00
65f4cbf487 Fix template test results on python2.6 2015-12-02 10:34:14 -08:00
48a3922d56 Add example for regex_replace using named groups 2015-12-02 09:44:26 -08:00
ca838d75e3 Get v2_playbook_on_start working
* Move self._tqm.load_callbacks() earlier to ensure that v2_on_playbook_start can fire
* Pass the playbook instance to v2_on_playbook_start
* Add a _file_name instance attribute to the playbook
2015-12-02 12:41:18 -05:00
f339184e29 Use CLI.expand_tilde also for the vault --output file 2015-12-02 09:24:36 -08:00
91f71b0ace added remote environment var setting to changelog 2015-12-02 09:09:35 -08:00
f2f310472f Make module_lang default to whatever LANG is set to on the control node 2015-12-02 09:07:26 -08:00
de7dc5d07f Catch additional assertion errors for load_list_of_blocks 2015-12-02 09:04:59 -08:00
ae5cfb2898 better error on invalid task lists 2015-12-02 08:14:37 -08:00
381409140e Minor tweak and comment addition to 974a0ce3 2015-12-02 09:10:20 -05:00
be92f909ee Update debug messages and comments
The comment was taken literally from lib/plugins/strategy/linear.py and
makes no sense in free.py where we have no noop tasks.

Also update the debug messages.
2015-12-02 09:00:27 -05:00
974a0ce3fb Fix issue #13370
all_blocks is referenced after the loop over included_files, so it needs
to be initialized before this loop, not inside.
2015-12-02 09:00:26 -05:00
1f1febaa0d Let PlayIterator.add_tasks accept empty task lists
PlayIterator.add_tasks raised an error when trying to add an empty task
list.  This was the root cause of ansible issue #13370.
2015-12-02 09:00:26 -05:00
3c25ae2e10 updated new module list
added missing modules and fixed alphabetical ordering
2015-12-01 23:53:43 -08:00
d9218ce33f reformated test, changed big assert to with_items
much easier to see the individual condition that causes the failure
when using with_items and evaluating each part of the assert individually
2015-12-01 21:26:36 -08:00
346a9fe87d unconditionally set vars on init to avoid issues with var precedence 2015-12-01 21:25:43 -08:00
5b5c6c4f47 fixes a syntax issue with module_utils/eapi.py
This patch fixes an issue with the common args dict in the eapi shared
module.  This patch is required for the eapi shared module to be properly
imported and is therefore should be applied to all instances.
2015-12-01 20:46:11 -08:00
02d059271c initial add of ssh shared module.
This ssh shared module is used for building modules that require an
interactive shell environment such as those required for connecting
to network devices
2015-12-01 19:15:41 -08:00
a6771b2255 adds module create function for eapi.py shared module
This commit changes the way modules create an instance of AnsibleModule to
now use a common function, eapi_module.  This function will now automatically
append the common argument spec to the module argument_spec.  Module
arguments can override common module arguments
2015-12-01 19:14:38 -08:00
a9e8b54246 initial add of the ios shared module
This adds shared module support for building modules that connect to Cisco
IOS devices.  It builds on the module_utils/ssh.py shared module.
2015-12-01 19:05:14 -08:00
d2108e9ff3 fixed signature for init on callbacks
also removed passing display to base class which already handles this
2015-12-01 14:07:47 -08:00
59dadc4f6b allow shell plugin to affect remote module filename
Fix for 13368, added get_remote_filename to shell plugins, powershell version appends .ps1 if necessary, base shell plugin no-ops
2015-12-01 14:02:01 -08:00
927d28e5d5 added pull's code sig verification to changelog 2015-12-01 09:55:06 -08:00
a61718cfc5 Revert "Note that su now works with local connection"
This reverts commit 93ef35e6a9.

bcoca already added this
2015-12-01 09:49:08 -08:00
93ef35e6a9 Note that su now works with local connection 2015-12-01 09:14:10 -08:00
b0e22d7701 _connect no longer takes a port argument 2015-12-01 09:12:55 -08:00
1b7db6316e updated changelog to show su now works with local 2015-12-01 09:11:30 -08:00
ca8c6e8e1c ignore password flags in become conflict check
since all the --ask pass options end up triggering the same code
and are functionally equivalent, ignore them when it comes to checking
privilege escalation conflicts. This allows using -K when --become-method=su
and so on.
2015-12-01 08:57:33 -08:00
204e27ca66 avoid inheritance issues with default=dict declaration at class level
this should avoid the issue of subsequent plays not prompting for a var
prompted for in a previous play.
fixes #13363
2015-11-30 15:12:53 -08:00
f96730003b Also make sure remote_user is defaulted correctly for delegated hosts
Fixes #13323
2015-11-30 16:16:11 -05:00
4f3f79d37b Call the function :-)
Fixes #13330
2015-11-30 12:34:55 -08:00
89f0207007 Ensure port is (re)set for delegated-to hosts
Fixes #13265
2015-11-30 14:41:05 -05:00
f8ed1c003a fixed typo 2015-11-30 09:21:26 -08:00
c5cd908c33 allow for bad stdout return from make temp dir command
fixes #13359
2015-11-30 09:20:24 -08:00
958da26d18 corrected become_methods class variable in winrm
This should now correctly react when using become with winrm
fixes #13331
2015-11-30 08:35:33 -08:00
a5d6be6dd2 Make sure run_once tasks properly set variables for all active hosts
Fixes #13267
2015-11-30 11:28:28 -05:00
7af506e7cf Use text_type instead of unicode 2015-11-30 11:28:25 -05:00
3a0f2475b2 Make sure the uuid in vars is string 2015-11-30 10:27:21 -05:00
2db3f12027 Re-implement lookup wantlist
Fixes #13285
2015-11-29 23:45:14 -05:00
bb52b45ea0 Do not copy variable_manager each time. Instead, keep host and local variable_manager sync.
Fix https://github.com/ansible/ansible/issues/13221
2015-11-29 23:15:01 -05:00
4114a3097f Tweak location of stats callback execution and properly relocate stats output code 2015-11-28 14:02:50 -05:00
73a269f9a5 Put in trap for args being None
_normalize_old_style_args can return None. If it does, the loop
"for args in args" blows up.
2015-11-28 13:44:44 -05:00
737e467b8a Trigger on_stats just once, not once for each play
Fixes #13271
2015-11-28 13:37:02 -05:00
cac0eea291 Explicitly accept become_success in awaiting_prompt state
If we request escalation with a password, we start in expecting_prompt
state. If the escalation then succeeds without the password, i.e., the
become_success response arrives, we must explicitly move into the next
state (awaiting_escalation, which immediately goes into ready_to_send),
so that we no longer try to apply the timeout.

Otherwise, we would leak the success notification and eventually
timeout. But if the module response did arrive before the timeout
expired, the "process has already exited" test would do the right
thing by accident (which is why it didn't fail more often).

Fixes #13289
2015-11-28 10:22:35 -05:00
54843d88ee Re-adding role_name/role_uuid variables 2015-11-28 10:00:42 -05:00
47651e6c22 More restrictive test against variable name to allow setting variable starting with _. 2015-11-28 10:00:38 -05:00
9e6ec4c6b0 Switch parameters validation after parsing in order to be more consistent between old and new style. 2015-11-28 10:00:34 -05:00
6457f88aab Fix missing word in developing_modules.rst 2015-11-28 10:00:25 -05:00
e210da3659 Fix typo in modules_core.rst 2015-11-28 10:00:22 -05:00
e0ecaac90d changelog: minor formating fix 2015-11-28 10:00:18 -05:00
dbedcd3538 avoids prompting for vars during syntax check
fixes #13319
2015-11-27 11:46:32 -08:00
4e6442fd19 removes editorial
I feel that Ansible is above the "my hosted Git community is better than yours" discussion and thus removed the editorial around Bitbucket
2015-11-27 11:15:57 -08:00
126249d69a Add assertions for ansible_date_time in setup result. 2015-11-27 00:49:02 -05:00
056372690f Do not double transform to unicode 2015-11-25 07:56:06 -08:00
9cee982a62 fixing errors with utf-8 values
removing utf-8 stanza

changing cast to binary_type instead

using to_unicode
2015-11-25 07:55:52 -08:00
b69942a6d2 added missing : 2015-11-25 10:57:55 -08:00
d9858ee73a added missing events to base class 2015-11-25 10:57:55 -08:00
64bcab9253 fixes to fetch action module
* now only runs remote checksum when needed (fixes #12290)
 * unified return points to simplify program flow
2015-11-25 10:57:04 -08:00
fc4326dc0c Fix ssh state issues by simply assuming it's never connected 2015-11-24 12:01:42 -05:00
92ea5c9f7b Properly check for prompting state when re-using ssh connection
Fixes #13278
2015-11-24 09:10:51 -05:00
90021104d5 Use to_unicode instead of str() 2015-11-23 16:49:00 -05:00
8bd5abaf1e Allow debug var parameter to accept a list or dict. Fix https://github.com/ansible/ansible/issues/13252 2015-11-23 16:49:00 -05:00
1ab60564ae Add integration tests for zypper
Modeled after the yum tests but also tests local package installations
as fixed with PR#1256.

This depends on PRs #1256, #1261 and #1262 in ansible-modules-extra.
2015-11-23 15:22:29 -05:00
af2e94e3c7 test_hg fix: remove reference to "head"
ERROR! error while evaluating conditional: head.stat.isreg

This is remnant from earlier change 50e5d81777
which removed stat on head file..
2015-11-23 14:34:21 -05:00
5378a6003a test_svn fix: remove hardcoded "~/ansible_testing/svn" path 2015-11-23 14:33:48 -05:00
2859933a79 We should give pipes.quote() a string every time 2015-11-23 14:27:56 -05:00
42bffeec7c Template (and include vars) PlaybookInclude paths
Fixes #13249
2015-11-23 14:04:14 -05:00
9a8e95bff3 Modify task executor to reuse connection inside a loop. Fix WinRM connection to set _connected properly and display when remote shell is opened/closed. Add integration test using raw + with_items. 2015-11-23 14:04:00 -05:00
54ec2a0b84 docsite: cloudstack: fix missing quotes in example 2015-11-23 14:03:55 -05:00
1e9e6339d1 marked spot that should send per item reulsts 2015-11-23 14:03:51 -05:00
5bc3efe34b Update submodule refs 2015-11-23 09:02:12 -08:00
7d19ad82eb Recommend using pywinrm >= 0.1.1 from PyPI instead of GitHub version. 2015-11-20 15:40:34 -08:00
c1bb3aea06 Documentation: Update the Vagrant Guide
This is an attempt to solve #7665.

Revert the change applied by f56a6e0951
(#12310), as the inventory generated by Vagrant still rely on the legacy
`_ssh` setting names for backwards compatibility reasons.
See also https://github.com/mitchellh/vagrant/issues/6570
2015-11-21 14:03:24 -08:00
011df4ad24 Update docker_login so docs work 2015-11-20 13:59:02 -08:00
c71ef9e3d7 Fix non-module plugins picking up files that did not end in .py.
This was caused by accessing the cache using the passed in mod_type
rather than the suffix that we calculate with knowledge of whether this
is a module or non-module plugin.
2015-11-20 13:51:29 -08:00
e9ed190f7b Update submodule refs 2015-11-20 12:45:27 -08:00
fe090b0fb9 Add docker_login module to the changelog 2015-11-20 12:44:48 -08:00
50a924bb04 Docker cp sets file ownership to root:root so we can't use it.
Fixes #13219
2015-11-20 07:54:07 -08:00
1e968d34cb Simplify code a little 2015-11-19 09:56:58 -08:00
c99fffa936 Use ansible_host in synchronize module
Fixes #13073
2015-11-19 09:56:49 -08:00
f2225395f9 winrm error handling tweaks 2015-11-19 09:58:33 -05:00
c33f60435b fast winrm put_file without size restrictions 2015-11-19 09:58:28 -05:00
ab8bb57f5e Version bump for 2.0.0-0.6.rc1 2015-11-19 09:15:45 -05:00
6137 changed files with 110588 additions and 477526 deletions

View File

@ -1,217 +0,0 @@
trigger:
batch: true
branches:
include:
- devel
- stable-*
pr:
autoCancel: true
branches:
include:
- devel
- stable-*
schedules:
- cron: 0 7 * * *
displayName: Nightly
always: true
branches:
include:
- devel
- stable-*
variables:
- name: checkoutPath
value: ansible
- name: coverageBranches
value: devel
- name: entryPoint
value: test/utils/shippable/shippable.sh
- name: fetchDepth
value: 500
resources:
containers:
- container: default
image: quay.io/ansible/azure-pipelines-test-container:3.0.0
pool: Standard
stages:
- stage: Sanity
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Test {0}
testFormat: sanity/{0}
targets:
- test: 1
- test: 2
- test: 3
- test: 4
- test: 5
- stage: Units
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Python {0}
testFormat: units/{0}
targets:
- test: 2.7
- test: 3.5
- test: 3.6
- test: 3.7
- test: 3.8
- test: 3.9
- test: '3.10'
- stage: Windows
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Server {0}
testFormat: windows/{0}/1
targets:
- test: 2012
- test: 2012-R2
- test: 2016
- test: 2019
- test: 2022
- stage: Remote
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
targets:
- name: macOS 12.0
test: macos/12.0
- name: RHEL 7.9
test: rhel/7.9
- name: RHEL 8.5 py36
test: rhel/8.5@3.6
- name: RHEL 8.5 py38
test: rhel/8.5@3.8
- name: RHEL 9.0
test: rhel/9.0
- name: FreeBSD 12.3
test: freebsd/12.3
- name: FreeBSD 13.0
test: freebsd/13.0
groups:
- 1
- 2
- 3
- 4
- 5
- stage: Docker
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
testFormat: linux/{0}
targets:
- name: Alpine 3
test: alpine3
- name: CentOS 7
test: centos7
- name: Fedora 34
test: fedora34
- name: Fedora 35
test: fedora35
- name: openSUSE 15 py2
test: opensuse15py2
- name: openSUSE 15 py3
test: opensuse15
- name: Ubuntu 18.04
test: ubuntu1804
- name: Ubuntu 20.04
test: ubuntu2004
groups:
- 1
- 2
- 3
- 4
- 5
- stage: Galaxy
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Python {0}
testFormat: galaxy/{0}/1
targets:
- test: 3.8
- test: 3.9
- test: '3.10'
- stage: Generic
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Python {0}
testFormat: generic/{0}/1
targets:
- test: 3.8
- test: 3.9
- test: '3.10'
- stage: Incidental_Remote
displayName: Incidental Remote
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
testFormat: i/{0}
targets:
- name: RHEL 8.5 py36
test: rhel/8.5@3.6
- name: RHEL 8.5 py38
test: rhel/8.5@3.8
- stage: Incidental_Windows
displayName: Incidental Windows
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Server {0}
testFormat: i/windows/{0}
targets:
- test: 2012
- test: 2012-R2
- test: 2016
- test: 2019
- test: 2022
- stage: Incidental
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
testFormat: i/{0}/1
targets:
- name: IOS Python
test: ios/csr1000v/
- name: VyOS Python
test: vyos/1.1.8/
- name: AWS Python 2.7
test: aws/2.7
- name: AWS Python 3.6
test: aws/3.6
- name: Cloud Python
test: cloud/
- stage: Summary
condition: succeededOrFailed()
dependsOn:
- Sanity
- Units
- Windows
- Remote
- Docker
- Galaxy
- Generic
- Incidental_Remote
- Incidental_Windows
- Incidental
jobs:
- template: templates/coverage.yml

View File

@ -1,20 +0,0 @@
#!/usr/bin/env bash
# Aggregate code coverage results for later processing.
set -o pipefail -eu
agent_temp_directory="$1"
PATH="${PWD}/bin:${PATH}"
mkdir "${agent_temp_directory}/coverage/"
options=(--venv --color -v)
ansible-test coverage combine --group-by command --export "${agent_temp_directory}/coverage/" "${options[@]}"
if ansible-test coverage analyze targets generate --help >/dev/null 2>&1; then
# Only analyze coverage if the installed version of ansible-test supports it.
# Doing so allows this script to work unmodified for multiple Ansible versions.
ansible-test coverage analyze targets generate "${agent_temp_directory}/coverage/coverage-analyze-targets.json" "${options[@]}"
fi

View File

@ -1,60 +0,0 @@
#!/usr/bin/env python
"""
Combine coverage data from multiple jobs, keeping the data only from the most recent attempt from each job.
Coverage artifacts must be named using the format: "Coverage $(System.JobAttempt) {StableUniqueNameForEachJob}"
The recommended coverage artifact name format is: Coverage $(System.JobAttempt) $(System.StageDisplayName) $(System.JobDisplayName)
Keep in mind that Azure Pipelines does not enforce unique job display names (only names).
It is up to pipeline authors to avoid name collisions when deviating from the recommended format.
"""
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
import re
import shutil
import sys
def main():
"""Main program entry point."""
source_directory = sys.argv[1]
if '/ansible_collections/' in os.getcwd():
output_path = "tests/output"
else:
output_path = "test/results"
destination_directory = os.path.join(output_path, 'coverage')
if not os.path.exists(destination_directory):
os.makedirs(destination_directory)
jobs = {}
count = 0
for name in os.listdir(source_directory):
match = re.search('^Coverage (?P<attempt>[0-9]+) (?P<label>.+)$', name)
label = match.group('label')
attempt = int(match.group('attempt'))
jobs[label] = max(attempt, jobs.get(label, 0))
for label, attempt in jobs.items():
name = 'Coverage {attempt} {label}'.format(label=label, attempt=attempt)
source = os.path.join(source_directory, name)
source_files = os.listdir(source)
for source_file in source_files:
source_path = os.path.join(source, source_file)
destination_path = os.path.join(destination_directory, source_file + '.' + label)
print('"%s" -> "%s"' % (source_path, destination_path))
shutil.copyfile(source_path, destination_path)
count += 1
print('Coverage file count: %d' % count)
print('##vso[task.setVariable variable=coverageFileCount]%d' % count)
print('##vso[task.setVariable variable=outputPath]%s' % output_path)
if __name__ == '__main__':
main()

View File

@ -1,24 +0,0 @@
#!/usr/bin/env bash
# Check the test results and set variables for use in later steps.
set -o pipefail -eu
if [[ "$PWD" =~ /ansible_collections/ ]]; then
output_path="tests/output"
else
output_path="test/results"
fi
echo "##vso[task.setVariable variable=outputPath]${output_path}"
if compgen -G "${output_path}"'/junit/*.xml' > /dev/null; then
echo "##vso[task.setVariable variable=haveTestResults]true"
fi
if compgen -G "${output_path}"'/bot/ansible-test-*' > /dev/null; then
echo "##vso[task.setVariable variable=haveBotResults]true"
fi
if compgen -G "${output_path}"'/coverage/*' > /dev/null; then
echo "##vso[task.setVariable variable=haveCoverageData]true"
fi

View File

@ -1,101 +0,0 @@
#!/usr/bin/env python
"""
Upload code coverage reports to codecov.io.
Multiple coverage files from multiple languages are accepted and aggregated after upload.
Python coverage, as well as PowerShell and Python stubs can all be uploaded.
"""
import argparse
import dataclasses
import pathlib
import shutil
import subprocess
import tempfile
import typing as t
import urllib.request
@dataclasses.dataclass(frozen=True)
class CoverageFile:
name: str
path: pathlib.Path
flags: t.List[str]
@dataclasses.dataclass(frozen=True)
class Args:
dry_run: bool
path: pathlib.Path
def parse_args() -> Args:
parser = argparse.ArgumentParser()
parser.add_argument('-n', '--dry-run', action='store_true')
parser.add_argument('path', type=pathlib.Path)
args = parser.parse_args()
# Store arguments in a typed dataclass
fields = dataclasses.fields(Args)
kwargs = {field.name: getattr(args, field.name) for field in fields}
return Args(**kwargs)
def process_files(directory: pathlib.Path) -> t.Tuple[CoverageFile, ...]:
processed = []
for file in directory.joinpath('reports').glob('coverage*.xml'):
name = file.stem.replace('coverage=', '')
# Get flags from name
flags = name.replace('-powershell', '').split('=') # Drop '-powershell' suffix
flags = [flag if not flag.startswith('stub') else flag.split('-')[0] for flag in flags] # Remove "-01" from stub files
processed.append(CoverageFile(name, file, flags))
return tuple(processed)
def upload_files(codecov_bin: pathlib.Path, files: t.Tuple[CoverageFile, ...], dry_run: bool = False) -> None:
for file in files:
cmd = [
str(codecov_bin),
'--name', file.name,
'--file', str(file.path),
]
for flag in file.flags:
cmd.extend(['--flags', flag])
if dry_run:
print(f'DRY-RUN: Would run command: {cmd}')
continue
subprocess.run(cmd, check=True)
def download_file(url: str, dest: pathlib.Path, flags: int, dry_run: bool = False) -> None:
if dry_run:
print(f'DRY-RUN: Would download {url} to {dest} and set mode to {flags:o}')
return
with urllib.request.urlopen(url) as resp:
with dest.open('w+b') as f:
# Read data in chunks rather than all at once
shutil.copyfileobj(resp, f, 64 * 1024)
dest.chmod(flags)
def main():
args = parse_args()
url = 'https://ci-files.testing.ansible.com/codecov/linux/codecov'
with tempfile.TemporaryDirectory(prefix='codecov-') as tmpdir:
codecov_bin = pathlib.Path(tmpdir) / 'codecov'
download_file(url, codecov_bin, 0o755, args.dry_run)
files = process_files(args.path)
upload_files(codecov_bin, files, args.dry_run)
if __name__ == '__main__':
main()

View File

@ -1,17 +0,0 @@
#!/usr/bin/env bash
# Generate code coverage reports for uploading to Azure Pipelines and codecov.io.
set -o pipefail -eu
PATH="${PWD}/bin:${PATH}"
if ! ansible-test --help >/dev/null 2>&1; then
# Install the devel version of ansible-test for generating code coverage reports.
# This is only used by Ansible Collections, which are typically tested against multiple Ansible versions (in separate jobs).
# Since a version of ansible-test is required that can work the output from multiple older releases, the devel version is used.
pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check
fi
# Generate stubs using docker (if supported) otherwise fall back to using a virtual environment instead.
# The use of docker is required when Powershell code is present, but Ansible 2.12 was the first version to support --docker with coverage.
ansible-test coverage xml --group-by command --stub --docker --color -v || ansible-test coverage xml --group-by command --stub --venv --color -v

View File

@ -1,34 +0,0 @@
#!/usr/bin/env bash
# Configure the test environment and run the tests.
set -o pipefail -eu
entry_point="$1"
test="$2"
read -r -a coverage_branches <<< "$3" # space separated list of branches to run code coverage on for scheduled builds
export COMMIT_MESSAGE
export COMPLETE
export COVERAGE
export IS_PULL_REQUEST
if [ "${SYSTEM_PULLREQUEST_TARGETBRANCH:-}" ]; then
IS_PULL_REQUEST=true
COMMIT_MESSAGE=$(git log --format=%B -n 1 HEAD^2)
else
IS_PULL_REQUEST=
COMMIT_MESSAGE=$(git log --format=%B -n 1 HEAD)
fi
COMPLETE=
COVERAGE=
if [ "${BUILD_REASON}" = "Schedule" ]; then
COMPLETE=yes
if printf '%s\n' "${coverage_branches[@]}" | grep -q "^${BUILD_SOURCEBRANCHNAME}$"; then
COVERAGE=yes
fi
fi
"${entry_point}" "${test}" 2>&1 | "$(dirname "$0")/time-command.py"

View File

@ -1,25 +0,0 @@
#!/usr/bin/env python
"""Prepends a relative timestamp to each input line from stdin and writes it to stdout."""
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import sys
import time
def main():
"""Main program entry point."""
start = time.time()
sys.stdin.reconfigure(errors='surrogateescape')
sys.stdout.reconfigure(errors='surrogateescape')
for line in sys.stdin:
seconds = time.time() - start
sys.stdout.write('%02d:%02d %s' % (seconds // 60, seconds % 60, line))
sys.stdout.flush()
if __name__ == '__main__':
main()

View File

@ -1,29 +0,0 @@
# This template adds a job for processing code coverage data.
# It will upload results to Azure Pipelines and codecov.io.
# Use it from a job stage that completes after all other jobs have completed.
# This can be done by placing it in a separate summary stage that runs after the test stage(s) have completed.
jobs:
- job: Coverage
displayName: Code Coverage
container: default
workspace:
clean: all
steps:
- checkout: self
fetchDepth: $(fetchDepth)
path: $(checkoutPath)
- task: DownloadPipelineArtifact@2
displayName: Download Coverage Data
inputs:
path: coverage/
patterns: "Coverage */*=coverage.combined"
- bash: .azure-pipelines/scripts/combine-coverage.py coverage/
displayName: Combine Coverage Data
- bash: .azure-pipelines/scripts/report-coverage.sh
displayName: Generate Coverage Report
condition: gt(variables.coverageFileCount, 0)
- bash: .azure-pipelines/scripts/publish-codecov.py "$(outputPath)"
displayName: Publish to codecov.io
condition: gt(variables.coverageFileCount, 0)
continueOnError: true

View File

@ -1,55 +0,0 @@
# This template uses the provided targets and optional groups to generate a matrix which is then passed to the test template.
# If this matrix template does not provide the required functionality, consider using the test template directly instead.
parameters:
# A required list of dictionaries, one per test target.
# Each item in the list must contain a "test" or "name" key.
# Both may be provided. If one is omitted, the other will be used.
- name: targets
type: object
# An optional list of values which will be used to multiply the targets list into a matrix.
# Values can be strings or numbers.
- name: groups
type: object
default: []
# An optional format string used to generate the job name.
# - {0} is the name of an item in the targets list.
- name: nameFormat
type: string
default: "{0}"
# An optional format string used to generate the test name.
# - {0} is the name of an item in the targets list.
- name: testFormat
type: string
default: "{0}"
# An optional format string used to add the group to the job name.
# {0} is the formatted name of an item in the targets list.
# {{1}} is the group -- be sure to include the double "{{" and "}}".
- name: nameGroupFormat
type: string
default: "{0} - {{1}}"
# An optional format string used to add the group to the test name.
# {0} is the formatted test of an item in the targets list.
# {{1}} is the group -- be sure to include the double "{{" and "}}".
- name: testGroupFormat
type: string
default: "{0}/{{1}}"
jobs:
- template: test.yml
parameters:
jobs:
- ${{ if eq(length(parameters.groups), 0) }}:
- ${{ each target in parameters.targets }}:
- name: ${{ format(parameters.nameFormat, coalesce(target.name, target.test)) }}
test: ${{ format(parameters.testFormat, coalesce(target.test, target.name)) }}
- ${{ if not(eq(length(parameters.groups), 0)) }}:
- ${{ each group in parameters.groups }}:
- ${{ each target in parameters.targets }}:
- name: ${{ format(format(parameters.nameGroupFormat, parameters.nameFormat), coalesce(target.name, target.test), group) }}
test: ${{ format(format(parameters.testGroupFormat, parameters.testFormat), coalesce(target.test, target.name), group) }}

View File

@ -1,45 +0,0 @@
# This template uses the provided list of jobs to create test one or more test jobs.
# It can be used directly if needed, or through the matrix template.
parameters:
# A required list of dictionaries, one per test job.
# Each item in the list must contain a "job" and "name" key.
- name: jobs
type: object
jobs:
- ${{ each job in parameters.jobs }}:
- job: test_${{ replace(replace(replace(replace(job.test, '/', '_'), '.', '_'), '-', '_'), '@', '_') }}
displayName: ${{ job.name }}
container: default
workspace:
clean: all
steps:
- checkout: self
fetchDepth: $(fetchDepth)
path: $(checkoutPath)
- bash: .azure-pipelines/scripts/run-tests.sh "$(entryPoint)" "${{ job.test }}" "$(coverageBranches)"
displayName: Run Tests
- bash: .azure-pipelines/scripts/process-results.sh
condition: succeededOrFailed()
displayName: Process Results
- bash: .azure-pipelines/scripts/aggregate-coverage.sh "$(Agent.TempDirectory)"
condition: eq(variables.haveCoverageData, 'true')
displayName: Aggregate Coverage Data
- task: PublishTestResults@2
condition: eq(variables.haveTestResults, 'true')
inputs:
testResultsFiles: "$(outputPath)/junit/*.xml"
displayName: Publish Test Results
- task: PublishPipelineArtifact@1
condition: eq(variables.haveBotResults, 'true')
displayName: Publish Bot Results
inputs:
targetPath: "$(outputPath)/bot/"
artifactName: "Bot $(System.JobAttempt) $(System.StageDisplayName) $(System.JobDisplayName)"
- task: PublishPipelineArtifact@1
condition: eq(variables.haveCoverageData, 'true')
displayName: Publish Coverage Data
inputs:
targetPath: "$(Agent.TempDirectory)/coverage/"
artifactName: "Coverage $(System.JobAttempt) $(System.StageDisplayName) $(System.JobDisplayName)"

View File

@ -1,5 +0,0 @@
team = "ansible"
repo = "ansible"
check_sha = "f31421576b00f0b167cdbe61217c31c21a41ac02" # the very first commit in repo
fix_commit_msg = false # Don't replace "#" with "GH-"
default_branch = "devel"

4
.coveragerc Normal file
View File

@ -0,0 +1,4 @@
[report]
omit =
*/python?.?/*
*/site-packages/nose/*

2
.gitattributes vendored
View File

@ -1 +1 @@
.github/ export-ignore
CHANGELOG.md merge=union

151
.github/BOTMETA.yml vendored
View File

@ -1,151 +0,0 @@
automerge: false
collection_redirect: true
notifications: false
files:
$module_utils/csharp: &id001
labels: windows
maintainers: $team_windows_core
support: core
$module_utils/network:
labels: networking
$module_utils/network/common:
maintainers: $team_networking
support: network
$module_utils/powershell: *id001
$modules:
ignored: ryansb tomaszkiewicz
$modules/lineinfile.py: $team_ansible samdoran
$modules/stat.py:
ignored: bpennypacker
$modules/unarchive.py:
ignored: dagwieers
labels: m:unarchive
maintainers: pileofrogs
$modules/add_host.py:
ignored: skvidal
maintainers: $team_ansible
$modules/get_url.py: ptux
$modules/uri.py:
ignored: romeotheriault
maintainers: $team_ansible
$modules/pip.py: Lujeni webknjaz
$modules//yum.py:
ignored: skvidal
maintainers: $team_ansible kustodian
$modules/user.py: $team_ansible samdoran
$modules/pause.py: samdoran
$modules/wait_for.py: gregswift
$plugins/cliconf/:
labels: networking
$plugins/connection/psrp.py: *id001
$plugins/connection/winrm.py: *id001
$plugins/doc_fragments/url_windows.py:
labels: windows
maintainers: $team_windows_core
support: core
$plugins/httpapi:
labels: networking
maintainers: $team_networking
support: network
$plugins/netconf/:
labels: networking
maintainers: $team_networking
support: network
$plugins/shell/powershell.py: *id001
$plugins/terminal/:
labels: networking
$plugins/terminal/__init__.py:
support: network
.github/BOTMETA.yml:
labels: botmeta
support: core
docs/:
maintainers:
- acozine
docs/docsite/rst/community/:
maintainers:
- gundalow
docs/docsite/rst/dev_guide/:
maintainers:
- gundalow
docs/docsite/rst/network/:
labels: networking
maintainers:
- samccann
docs/docsite/rst/user_guide/windows: *id001
hacking/report.py:
notified: mattclay
hacking/shippable/:
notified: mattclay
lib/ansible/cli/scripts/ansible_connection_cli_stub.py:
keywords:
- persistent connection
labels: networking
lib/ansible/config/ansible_builtin_runtime.yml:
labels: runtime
maintainers: gundalow
lib/ansible/executor/powershell: *id001
lib/ansible/inventory:
keywords:
- core inventory
- inventory
- inventory parsing
lib/ansible/playbook/handler.py:
keywords:
- handlers
lib/ansible/playbook/role:
keywords:
- roles path
- roles_path
- role
- role path
lib/ansible/playbook/role/include.py:
keywords:
- include role
- include_role
- role include
lib/ansible/playbook/role/requirement.py:
keywords:
- role dependencies
- role dep
- role dependency
lib/ansible/release.py:
notified: mattclay nitzmahone
lib/ansible/template:
keywords:
- jinja
- jinja2
lib/ansible/utils/collection_loader.py:
notified: mattclay nitzmahone
test/integration/targets/incidental_:
notified: mattclay
test/lib/:
notified: mattclay
test/lib/ansible_test/_util/controller/sanity/validate-modules:
keywords:
- validate-modules
notified:
- mattclay
test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/main.py:
notified:
- gundalow
- sivel
test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/schema.py:
notified:
- gundalow
- sivel
test/sanity/:
notified: mattclay
test/sanity/ignore.txt:
notified: tremble
test/support/:
notified: mattclay
test/utils/shippable/:
notified: mattclay
macros:
module_utils: lib/ansible/module_utils
modules: lib/ansible/modules
plugins: lib/ansible/plugins
team_ansible: []
team_networking: Qalthos ganeshrn trishnaguha justjais NilashishC danielmellado rohitthakur2590 GomathiselviS
team_windows_core: nitzmahone jborean93

View File

@ -1,3 +0,0 @@
# Community Code of Conduct
Please see the official [Ansible Community Code of Conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html).

View File

@ -1,25 +0,0 @@
# WELCOME TO ANSIBLE GITHUB
Hi! Nice to see you here!
## QUESTIONS ?
Please see the [Community Guide](https://docs.ansible.com/ansible/latest/community/index.html) for information on how to ask questions on the [mailing lists](https://docs.ansible.com/ansible/latest/community/communication.html#mailing-list-information) and IRC.
The GitHub issue tracker is not the best place for questions for various reasons, but both IRC and the mailing list are very helpful places for those things, as the community page explains best.
## CONTRIBUTING ?
By contributing you agree that these contributions are your own (or approved by your employer) and you grant a full, complete, irrevocable copyright license to all users and developers of the project, present and future, pursuant to the license of the project. You can also read the same [CLA](https://docs.ansible.com/ansible/latest/community/contributor_license_agreement.html) on the Ansible docsite.
Please review the [Community Guide](https://docs.ansible.com/ansible/latest/community/index.html) for more information on contributing to Ansible.
## BUG TO REPORT ?
First and foremost, also check the [Community Guide](https://docs.ansible.com/ansible/latest/community/index.html).
You can report bugs or make enhancement requests at the [Ansible GitHub issue page](http://github.com/ansible/ansible/issues/new/choose) by filling out the issue template that will be presented.
Also please make sure you are testing on the latest released version of Ansible or the development branch; see the [Installation Guide](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html) for details.
Thanks!

View File

@ -1 +0,0 @@
Please raise issues via the [new interface](https://github.com/ansible/ansible/issues/new/choose)

View File

@ -1,263 +0,0 @@
---
name: 🐛 Bug report
description: Create a report to help us improve
body:
- type: markdown
attributes:
value: >
**Thank you for wanting to report a bug in ansible-core!**
⚠
Verify first that your issue is not [already reported on
GitHub][issue search] and keep in mind that we may have to keep
the current behavior because [every change breaks someone's
workflow][XKCD 1172].
We try to be mindful about this.
Also test if the latest release and devel branch are affected too.
**Tip:** If you are seeking community support, please consider
[starting a mailing list thread or chatting in IRC][ML||IRC].
[ML||IRC]:
https://docs.ansible.com/ansible-core/devel/community/communication.html?utm_medium=github&utm_source=issue_form--bug_report.yml#mailing-list-information
[issue search]: ../search?q=is%3Aissue&type=issues
[XKCD 1172]: https://xkcd.com/1172/
- type: textarea
attributes:
label: Summary
description: Explain the problem briefly below.
placeholder: >-
When I try to do X with ansible-core from the devel branch on GitHub, Y
breaks in a way Z under the env E. Here are all the details I know
about this problem...
validations:
required: true
- type: dropdown
attributes:
label: Issue Type
description: >
Please select the single available option in the drop-down.
<details>
<summary>
<em>Why?</em>
</summary>
We would do it by ourselves but unfortunatelly, the curent
edition of GitHub Issue Forms Alpha does not support this yet 🤷
_We will make it easier in the future, once GitHub
supports dropdown defaults. Promise!_
</details>
# FIXME: Once GitHub allows defining the default choice, update this
options:
- Bug Report
validations:
required: true
- type: input
attributes:
label: Component Name
description: >
Write the short name of the rst file, module, plugin, task or
feature below, *use your best guess if unsure*.
**Tip:** Cannot find it in this repository? Please be advised that
the source for some parts of the documentation are hosted outside
of this repository. If the page you are reporting describes
modules/plugins/etc that are not officially supported by the
Ansible Core Engineering team, there is a good chance that it is
coming from one of the [Ansible Collections maintained by the
community][collections org]. If this is the case, please make sure
to file an issue under the appropriate project there instead.
[collections org]: /ansible-collections
placeholder: dnf, apt, yum, pip, user etc.
validations:
required: true
- type: textarea
attributes:
label: Ansible Version
description: >-
Paste verbatim output from `ansible --version` below, under
the prompt line. Please don't wrap it with tripple backticks — your
whole input will be turned into a code snippet automatically.
render: console
value: |
$ ansible --version
placeholder: |
$ ansible --version
ansible [core 2.11.0b4.post0] (detached HEAD ref: refs/) last updated 2021/04/02 00:33:35 (GMT +200)
config file = None
configured module search path = ['~/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = ~/src/github/ansible/ansible/lib/ansible
ansible collection location = ~/.ansible/collections:/usr/share/ansible/collections
executable location = bin/ansible
python version = 3.9.0 (default, Oct 26 2020, 13:08:59) [GCC 10.2.0]
jinja version = 2.11.3
libyaml = True
validations:
required: true
- type: textarea
attributes:
label: Configuration
description: >-
Paste verbatim output from `ansible-config dump --only-changed`
below, under the prompt line.
Please don't wrap it with tripple backticks — your
whole input will be turned into a code snippet automatically.
render: console
value: |
$ ansible-config dump --only-changed
placeholder: |
$ ansible-config dump --only-changed
DEFAULT_GATHERING(~/src/github/ansible/ansible/ansible.cfg) = smart
DEFAULT_HOST_LIST(~/src/github/ansible/ansible/ansible.cfg) = ['~/src/github/ansible/ansible/hosts']
DEFAULT_VAULT_PASSWORD_FILE(~/src/github/ansible/ansible/ansible.cfg) = ~/src/github/ansible/ansible/vault/print-password.sh
validations:
required: true
- type: textarea
attributes:
label: OS / Environment
description: >-
Provide all relevant information below, e.g. target OS versions,
network device firmware, etc.
placeholder: RHEL 8, CentOS Stream etc.
validations:
required: true
- type: textarea
attributes:
label: Steps to Reproduce
description: |
Describe exactly how to reproduce the problem, using a minimal test-case. It would *really* help us understand your problem if you could also pased any playbooks, configs and commands you used.
**HINT:** You can paste https://gist.github.com links for larger files.
value: |
<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
```
placeholder: |
1. Implement the following playbook:
```yaml
---
# ping.yml
- hosts: all
gather_facts: false
tasks:
- ping:
...
```
2. Then run `ANSIBLE_DEBUG=1 ansible-playbook ping.yml -vvvvv`
3. An error occurs.
validations:
required: true
- type: textarea
attributes:
label: Expected Results
description: >-
Describe what you expected to happen when running the steps above.
placeholder: >-
I expected X to happen because I assumed Y and was shocked
that it did not.
validations:
required: true
- type: textarea
attributes:
label: Actual Results
description: |
Describe what actually happened. If possible run with extra verbosity (`-vvvv`).
Paste verbatim command output and don't wrap it with tripple backticks — your
whole input will be turned into a code snippet automatically.
render: console
placeholder: >-
Certificate did not match expected hostname: files.pythonhosted.org. Certificate: {'notAfter': 'Apr 28 19:20:25 2021 GMT', 'subjectAltName': ((u'DNS', 'r.ssl.fastly.net'), (u'DNS', '*.catchpoint.com'), (u'DNS', '*.cnn.io'), (u'DNS', '*.dollarshaveclub.com'), (u'DNS', '*.eater.com'), (u'DNS', '*.fastly.picmonkey.com'), (u'DNS', '*.files.saymedia-content.com'), (u'DNS', '*.ft.com'), (u'DNS', '*.meetupstatic.com'), (u'DNS', '*.nfl.com'), (u'DNS', '*.pagar.me'), (u'DNS', '*.picmonkey.com'), (u'DNS', '*.realself.com'), (u'DNS', '*.sbnation.com'), (u'DNS', '*.shakr.com'), (u'DNS', '*.streamable.com'), (u'DNS', '*.surfly.com'), (u'DNS', '*.theverge.com'), (u'DNS', '*.thrillist.com'), (u'DNS', '*.vox-cdn.com'), (u'DNS', '*.vox.com'), (u'DNS', '*.voxmedia.com'), (u'DNS', 'eater.com'), (u'DNS', 'ft.com'), (u'DNS', 'i.gse.io'), (u'DNS', 'picmonkey.com'), (u'DNS', 'realself.com'), (u'DNS', 'static.wixstatic.com'), (u'DNS', 'streamable.com'), (u'DNS', 'surfly.com'), (u'DNS', 'theverge.com'), (u'DNS', 'vox-cdn.com'), (u'DNS', 'vox.com'), (u'DNS', 'www.joyent.com')), 'subject': ((('countryName', u'US'),), (('stateOrProvinceName', u'California'),), (('localityName', u'San Francisco'),), (('organizationName', u'Fastly, Inc'),), (('commonName', u'r.ssl.fastly.net'),))}
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/local/lib/python2.6/dist-packages/pip/commands/install.py", line 335, in run
wb.build(autobuilding=True)
File "/usr/local/lib/python2.6/dist-packages/pip/wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "/usr/local/lib/python2.6/dist-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/local/lib/python2.6/dist-packages/pip/req/req_set.py", line 620, in _prepare_file
session=self.session, hashes=hashes)
File "/usr/local/lib/python2.6/dist-packages/pip/download.py", line 821, in unpack_url
hashes=hashes
File "/usr/local/lib/python2.6/dist-packages/pip/download.py", line 659, in unpack_http_url
hashes)
File "/usr/local/lib/python2.6/dist-packages/pip/download.py", line 853, in _download_http_url
stream=True,
File "/usr/local/lib/python2.6/dist-packages/pip/_vendor/requests/sessions.py", line 521, in get
return self.request('GET', url, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/pip/download.py", line 386, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/pip/_vendor/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python2.6/dist-packages/pip/_vendor/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/pip/_vendor/cachecontrol/adapter.py", line 47, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
File "/usr/local/lib/python2.6/dist-packages/pip/_vendor/requests/adapters.py", line 506, in send
raise SSLError(e, request=request)
SSLError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/ef/ab/aa12712415809bf698e719b307419f953e25344e8f42d557533d7a02b276/netapp_lib-2020.7.16-py2-none-any.whl (Caused by SSLError(CertificateError("hostname 'files.pythonhosted.org' doesn't match either of 'r.ssl.fastly.net', '*.catchpoint.com', '*.cnn.io', '*.dollarshaveclub.com', '*.eater.com', '*.fastly.picmonkey.com', '*.files.saymedia-content.com', '*.ft.com', '*.meetupstatic.com', '*.nfl.com', '*.pagar.me', '*.picmonkey.com', '*.realself.com', '*.sbnation.com', '*.shakr.com', '*.streamable.com', '*.surfly.com', '*.theverge.com', '*.thrillist.com', '*.vox-cdn.com', '*.vox.com', '*.voxmedia.com', 'eater.com', 'ft.com', 'i.gse.io', 'picmonkey.com', 'realself.com', 'static.wixstatic.com', 'streamable.com', 'surfly.com', 'theverge.com', 'vox-cdn.com', 'vox.com', 'www.joyent.com'",),))
ERROR: Command "/usr/bin/python2.6 /root/ansible/test/lib/ansible_test/_data/quiet_pip.py install --disable-pip-version-check -r /root/ansible/test/lib/ansible_test/_data/requirements/units.txt -r tests/unit/requirements.txt -c /root/ansible/test/lib/ansible_test/_data/requirements/constraints.txt" returned exit status 2.
ERROR: Command "docker exec d47eb360db4ce779c1f690db964655b76e68895c4360ff252c46fe7fe6f5c75a /usr/bin/env ANSIBLE_TEST_CONTENT_ROOT=/root/ansible_collections/netapp/ontap LC_ALL=en_US.UTF-8 /usr/bin/python3.6 /root/ansible/bin/ansible-test units --metadata tests/output/.tmp/metadata-9i2qfrcl.json --truncate 200 --redact --color yes --requirements --python default --requirements-mode only" returned exit status 1.
validations:
required: true
- type: markdown
attributes:
value: >
*One last thing...*
*Please, complete **all** sections as described, this form
is [processed automatically by a robot][ansibot help].*
Thank you for your collaboration!
[ansibot help]:
/ansible/ansibullbot/blob/master/ISSUE_HELP.md#for-issue-submitters
- type: checkboxes
attributes:
label: Code of Conduct
description: |
Read the [Ansible Code of Conduct][CoC] first.
[CoC]: https://docs.ansible.com/ansible/latest/community/code_of_conduct.html?utm_medium=github&utm_source=issue_form--bug_report.yml
options:
- label: I agree to follow the Ansible Code of Conduct
required: true
...

View File

@ -1,26 +0,0 @@
# Ref: https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository#configuring-the-template-chooser
blank_issues_enabled: false # default: true
contact_links:
- name: 🔐 Security bug report 🔥
url: https://docs.ansible.com/ansible/latest/community/reporting_bugs_and_features.html?utm_medium=github&utm_source=issue_template_chooser
about: |
Please learn how to report security vulnerabilities here.
For all security related bugs, email security@ansible.com
instead of using this issue tracker and you will receive
a prompt response.
For more information, see
https://docs.ansible.com/ansible/latest/community/reporting_bugs_and_features.html
- name: 📝 Ansible Code of Conduct
url: https://docs.ansible.com/ansible/latest/community/code_of_conduct.html?utm_medium=github&utm_source=issue_template_chooser
about: ❤ Be nice to other members of the community. ☮ Behave.
- name: 💬 Talks to the community
url: https://docs.ansible.com/ansible/latest/community/communication.html?utm_medium=github&utm_source=issue_template_chooser#mailing-list-information
about: Please ask and answer usage questions here
- name: ⚡ Working groups
url: https://github.com/ansible/community/wiki
about: Interested in improving a specific area? Become a part of a working group!
- name: 💼 For Enterprise
url: https://www.ansible.com/products/engine?utm_medium=github&utm_source=issue_template_chooser
about: Red Hat offers support for the Ansible Automation Platform

View File

@ -1,199 +0,0 @@
---
name: 📝 Documentation Report
description: Ask us about docs
body:
- type: markdown
attributes:
value: >
**Thank you for wanting to report a problem with ansible-core
documentation!**
Please fill out your suggestions below. If the problem seems
straightforward, feel free to go ahead and
[submit a pull request] instead!
⚠
Verify first that your issue is not [already reported on
GitHub][issue search].
Also test if the latest release and devel branch are affected too.
**Tip:** If you are seeking community support, please consider
[starting a mailing list thread or chatting in IRC][ML||IRC].
[ML||IRC]:
https://docs.ansible.com/ansible-core/devel/community/communication.html?utm_medium=github&utm_source=issue_form--documentation_report.yml#mailing-list-information
[issue search]: ../search?q=is%3Aissue&type=issues
[submit a pull request]:
https://docs.ansible.com/ansible-core/devel/community/documentation_contributions.html
- type: textarea
attributes:
label: Summary
description: >
Explain the problem briefly below, add suggestions to wording
or structure.
**HINT:** Did you know the documentation has a `View on GitHub`
link on some pages? Feel free to use it to start a pull request
right from the GitHub UI!
placeholder: >-
I was reading the ansible-core documentation of version X and I'm having
problems understanding Y. It would be very helpful if that got
rephrased as Z.
validations:
required: true
- type: dropdown
attributes:
label: Issue Type
description: >
Please select the single available option in the drop-down.
<details>
<summary>
<em>Why?</em>
</summary>
We would do it by ourselves but unfortunatelly, the curent
edition of GitHub Issue Forms Alpha does not support this yet 🤷
_We will make it easier in the future, once GitHub
supports dropdown defaults. Promise!_
</details>
# FIXME: Once GitHub allows defining the default choice, update this
options:
- Documentation Report
validations:
required: true
- type: input
attributes:
label: Component Name
description: >
Write the short name of the rst file, module, plugin, task or
feature below, *use your best guess if unsure*.
**Tip:** Be advised that the source for some parts of the
documentation are hosted outside of this repository. If the page
you are reporting describes modules/plugins/etc that are not
officially supported by the Ansible Core Engineering team, there
is a good chance that it is coming from one of the [Ansible
Collections maintained by the community][collections org]. If this
is the case, please make sure to file an issue under the
appropriate project there instead.
[collections org]: /ansible-collections
placeholder: docs/docsite/rst/dev_guide/debugging.rst
validations:
required: true
- type: textarea
attributes:
label: Ansible Version
description: >-
Paste verbatim output from `ansible --version` below, under
the prompt line. Please don't wrap it with tripple backticks — your
whole input will be turned into a code snippet automatically.
render: console
value: |
$ ansible --version
placeholder: |
$ ansible --version
ansible [core 2.11.0b4.post0] (detached HEAD ref: refs/) last updated 2021/04/02 00:33:35 (GMT +200)
config file = None
configured module search path = ['~/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = ~/src/github/ansible/ansible/lib/ansible
ansible collection location = ~/.ansible/collections:/usr/share/ansible/collections
executable location = bin/ansible
python version = 3.9.0 (default, Oct 26 2020, 13:08:59) [GCC 10.2.0]
jinja version = 2.11.3
libyaml = True
validations:
required: true
- type: textarea
attributes:
label: Configuration
description: >-
Paste verbatim output from `ansible-config dump --only-changed`
below, under the prompt line.
Please don't wrap it with tripple backticks — your
whole input will be turned into a code snippet automatically.
render: console
value: |
$ ansible-config dump --only-changed
placeholder: |
$ ansible-config dump --only-changed
DEFAULT_GATHERING(~/src/github/ansible/ansible/ansible.cfg) = smart
DEFAULT_HOST_LIST(~/src/github/ansible/ansible/ansible.cfg) = ['~/src/github/ansible/ansible/hosts']
DEFAULT_VAULT_PASSWORD_FILE(~/src/github/ansible/ansible/ansible.cfg) = ~/src/github/ansible/ansible/vault/print-password.sh
validations:
required: true
- type: textarea
attributes:
label: OS / Environment
description: >-
Provide all relevant information below, e.g. OS version,
browser, etc.
placeholder: Fedora 33, Firefox etc.
validations:
required: true
- type: textarea
attributes:
label: Additional Information
description: |
Describe how this improves the documentation, e.g. before/after situation or screenshots.
**HINT:** You can paste https://gist.github.com links for larger files.
placeholder: >-
When the improvement is applied, it makes it more straightforward
to understand X.
validations:
required: true
- type: markdown
attributes:
value: >
*One last thing...*
*Please, complete **all** sections as described, this form
is [processed automatically by a robot][ansibot help].*
Thank you for your collaboration!
[ansibot help]:
/ansible/ansibullbot/blob/master/ISSUE_HELP.md#for-issue-submitters
- type: checkboxes
attributes:
label: Code of Conduct
description: |
Read the [Ansible Code of Conduct][CoC] first.
[CoC]: https://docs.ansible.com/ansible/latest/community/code_of_conduct.html?utm_medium=github&utm_source=issue_form--documentation_report.yml
options:
- label: I agree to follow the Ansible Code of Conduct
required: true
...

View File

@ -1,192 +0,0 @@
---
name: ✨ Feature request
description: Suggest an idea for this project
body:
- type: markdown
attributes:
value: >
**Thank you for wanting to suggest a feature for ansible-core!**
💡
Before you go ahead with your request, please first consider if it
would be useful for majority of the ansible-core users. As a
general rule of thumb, any feature that is only of interest to a
small sub group should be [implemented in a third-party Ansible
Collection][contribute to collections] or maybe even just your
project alone. Be mindful of the fact that the essential
ansible-core features have a broad impact.
If unsure, consider filing a [new proposal] instead outlining your
use-cases, the research and implementation considerations. Then,
start a discussion on one of the public [IRC meetings] we have just
for this.
<details>
<summary>
❗ Every change breaks someone's workflow.
</summary>
[![❗ Every change breaks someone's workflow.
](https://imgs.xkcd.com/comics/workflow.png)
](https://xkcd.com/1172/)
</details>
⚠
Verify first that your idea is not [already requested on
GitHub][issue search].
Also test if the devel branch does not already implement this.
**Tip:** If you are seeking community support, please consider
[starting a mailing list thread or chatting in IRC][ML||IRC].
[contribute to collections]:
https://docs.ansible.com/ansible-core/devel/community/contributing_maintained_collections.html?utm_medium=github&utm_source=issue_form--feature_request.yml
[IRC meetings]:
https://docs.ansible.com/ansible-core/devel/community/communication.html?utm_medium=github&utm_source=issue_form--feature_request.yml#irc-meetings
[issue search]: ../search?q=is%3Aissue&type=issues
[ML||IRC]:
https://docs.ansible.com/ansible-core/devel/community/communication.html?utm_medium=github&utm_source=issue_form--feature_request.yml#mailing-list-information
[new proposal]: ../../proposals/issues/new
- type: textarea
attributes:
label: Summary
description: >
Describe the new feature/improvement you would like briefly below.
What's the problem this feature will solve?
What are you trying to do, that you are unable to achieve
with ansible-core as it currently stands?
* Provide examples of real-world use cases that this would enable
and how it solves the problem you described.
* How do you solve this now?
* Have you tried to work around the problem using other tools?
* Could there be a different approach to solving this issue?
*Know **exactly** what you want?* Consider filing a [new proposal]
instead outlining your research and implementation considerations.
[new proposal]: ../../proposals/issues/new
placeholder: >-
I am trying to do X with ansible-core from the devel branch on GitHub and
I think that implementing a feature Y would be very helpful for me and
every other user of ansible-core because of Z.
validations:
required: true
- type: dropdown
attributes:
label: Issue Type
description: >
Please select the single available option in the drop-down.
<details>
<summary>
<em>Why?</em>
</summary>
We would do it by ourselves but unfortunatelly, the curent
edition of GitHub Issue Forms Alpha does not support this yet 🤷
_We will make it easier in the future, once GitHub
supports dropdown defaults. Promise!_
</details>
# FIXME: Once GitHub allows defining the default choice, update this
options:
- Feature Idea
validations:
required: true
- type: input
attributes:
label: Component Name
description: >
Write the short name of the module, plugin, task or feature below,
*use your best guess if unsure*.
Be aware that a lot of content that used to reside in this repository
previously, is now hosted under [individual collection
projects][collections org].
If this is the case, please make sure to file an issue under the
appropriate project there instead.
[collections org]: /ansible-collections
placeholder: dnf, apt, yum, pip, user etc.
validations:
required: true
- type: textarea
attributes:
label: Additional Information
description: |
Describe how the feature would be used, why it is needed and what it would solve.
**HINT:** You can paste https://gist.github.com links for larger files.
value: |
<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
```
placeholder: >-
I asked on https://stackoverflow.com/.... and the community
advised me to do X, Y and Z.
validations:
required: true
- type: markdown
attributes:
value: >
*One last thing...*
*Please, complete **all** sections as described, this form
is [processed automatically by a robot][ansibot help].*
Thank you for your collaboration!
[ansibot help]:
/ansible/ansibullbot/blob/master/ISSUE_HELP.md#for-issue-submitters
- type: checkboxes
attributes:
label: Code of Conduct
description: |
Read the [Ansible Code of Conduct][CoC] first.
[CoC]: https://docs.ansible.com/ansible/latest/community/code_of_conduct.html?utm_medium=github&utm_source=issue_form--feature_request.yml
options:
- label: I agree to follow the Ansible Code of Conduct
required: true
...

View File

@ -1,23 +0,0 @@
##### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
##### ISSUE TYPE
<!--- Pick one below and delete the rest -->
- Bugfix Pull Request
- Docs Pull Request
- Feature Pull Request
- Test Pull Request
##### COMPONENT NAME
<!--- Write the short name of the module, plugin, task or feature below -->
##### ADDITIONAL INFORMATION
<!--- Include additional information to help people understand the change here -->
<!--- A step-by-step reproduction of the problem is helpful if there is no related issue -->
<!--- Paste verbatim command output below, e.g. before and after your change -->
```paste below
```

View File

@ -1,15 +0,0 @@
---
- 2.13.0 Nobody's Fault but Mine
- 2.12.0 Dazed and Confused
- 2.11.0 Hey Hey, What Can I Do
- 2.10.0 When the Levee Breaks
- 2.9.0 Immigrant Song
- 2.8.0 How Many More Times
- 2.7.0 In the Light
- 2.6.0 Heartbreaker
- 2.5.0 Kashmir
- 2.4.0 Dancing Days
- 2.3.0 Ramble On
- 2.2.0 The Battle of Evermore
- 2.1.0 The Song Remains the Same
- 2.0.0 Over the Hills and Far Away

15
.github/SECURITY.md vendored
View File

@ -1,15 +0,0 @@
# Security Policy
## Supported Versions
Ansible applies security fixes according to the 3-versions-back support
policy. Please find more information in [our docs](
https://docs.ansible.com/ansible/devel/reference_appendices/release_and_maintenance.html#release-status
).
## Reporting a Vulnerability
We encourage responsible disclosure practices for security
vulnerabilities. Please read our [policies for reporting bugs](
https://docs.ansible.com/ansible/devel/community/reporting_bugs_and_features.html#reporting-a-bug
) if you want to report a security issue that might affect Ansible.

99
.gitignore vendored
View File

@ -2,10 +2,9 @@
*.py[co]
build
AUTHORS.TXT
# Emacs backup and autosave files...
# Emacs backup files...
*~
.\#*
\#*
# RPM stuff...
MANIFEST
dist
@ -17,101 +16,45 @@ rpm-build
.idea
#IntelliJ IDEA stuff..
*.iml
#VSCode stuff..
.vscode/
# Mac OS X stuff...
.DS_Store
# manpage build stuff...
docs/man/man1/ansible*.1
docs/man/man1/ansible*.1.asciidoc.in
docs/man/man1/ansible.1
docs/man/man1/ansible-doc.1
docs/man/man1/ansible-galaxy.1
docs/man/man1/ansible-playbook.1
docs/man/man1/ansible-pull.1
docs/man/man1/ansible-vault.1
docs/man/man3/*
# Sublime stuff
*.sublime-project
*.sublime-workspace
# docsite stuff...
docs/docsite/_build
docs/docsite/*.html
docs/docsite/htmlout
docs/docsite/rst/conf.py
docs/docsite/rst/index.rst
docs/docsite/rst/cli/ansible-*.rst
docs/docsite/rst/cli/ansible.rst
docs/docsite/rst/dev_guide/collections_galaxy_meta.rst
docs/docsite/rst/dev_guide/testing/sanity/index.rst.new
docs/docsite/rst/dev_guide/index.rst
docs/docsite/rst/modules/*.rst
docs/docsite/rst/collections/*.rst
!docs/docsite/rst/collections/all_plugins.rst
docs/docsite/rst/collections/*/*.rst
docs/docsite/rst/playbooks_directives.rst
docs/docsite/rst/plugins_by_category.rst
docs/docsite/rst/plugins/*/*.rst
docs/docsite/rst/reference_appendices/config.rst
docs/docsite/rst/reference_appendices/playbooks_keywords.rst
docs/docsite/rst_warnings
docs/docsite/searchindex.js
docs/docsite/_static/*.gif
docs/docsite/_static/*.png
docs/docsite/_static/websupport.js
docsite/rst/modules_by_category.rst
docsite/rst/list_of_*.rst
docsite/rst/*_module.rst
docsite/*.html
docsite/_static/*.gif
docsite/_static/*.png
docsite/_static/websupport.js
docsite/searchindex.js
docsite/htmlout
# deb building stuff...
debian/
deb-build
# Vim swap files
*.swp
*.swo
[._]*.un~
credentials.yml
# test output
*.retry
*.out
.pytest_cache/
.coverage
.tox
.cache
.pytest_cache
results.xml
coverage.xml
/test/units/cover-html
/test/integration/inventory
/test/integration/targets/*/backup/
/test/cache/*
# Development
/test/develop
venv
Vagrantfile
.vagrant
# Backwards compatibility with `stable-2.9` and earlier branches.
# Also used in the `devel` branch during early Ansible 2.10 development.
/lib/ansible.egg-info/
# First used in the `devel` branch during Ansible 2.10 development.
/lib/ansible_base.egg-info/
# First used in the `devel` branch during Ansible 2.11 development.
/lib/ansible_core.egg-info/
# vendored lib dir
lib/ansible/_vendor/*
!lib/ansible/_vendor/__init__.py
# test stuff
/test/integration/cloud-config-*.*
!/test/integration/cloud-config-*.*.template
.python-version
/hacking/tests/selinux/*.mod
/hacking/tests/selinux/*.pp
# Release directory
packaging/release/ansible_release
/.cache/
/test/results/
/test/integration/cloud-config-aws.yml
/test/integration/inventory.networking
/test/integration/inventory.winrm
/test/integration/cloud-config-aws.yml
/test/integration/cloud-config-cs.ini
# python 'rope' stuff
.ropeproject
# local 'ack' config files
.ackrc
# default 'coverage html' results
htmlcov/
# default 'coverage' tool data
.coverage
# ansible-test coverage results
test/units/.coverage.*
/test/integration/cloud-config-azure.yml
/SYMLINK_CACHE.json
changelogs/.plugin-cache.yaml
.ansible-test-timeout.json
ansible.egg-info/

6
.gitmodules vendored Normal file
View File

@ -0,0 +1,6 @@
[submodule "lib/ansible/modules/core"]
path = lib/ansible/modules/core
url = https://github.com/ansible/ansible-modules-core
[submodule "lib/ansible/modules/extras"]
path = lib/ansible/modules/extras
url = https://github.com/ansible/ansible-modules-extras

View File

@ -1,36 +0,0 @@
Michael DeHaan <michael.dehaan@gmail.com> <michael@ansibleworks.com>
Michael DeHaan <michael.dehaan@gmail.com> Michael DeHaan <michael@ansibleworks.com>
Michael DeHaan <michael.dehaan@gmail.com> <michael@ansible.com>
<bcoca@ansible.com> <brian.coca+git@gmail.com>
<bcoca@ansible.com> <briancoca+ansible@gmail.com>
<bcoca@ansible.com> <briancoca+dev@gmail.com>
<bcoca@ansible.com> <bcoca@tablethotels.com>
<a.badger@gmail.com> <toshio@fedoraproject.org>
James Tanner <tanner.jc@gmail.com>
<jimi@sngx.net> <jcammarata@ansibleworks.com>
Michael Scherer <misc@zarb.org> mscherer <misc@zarb.org>
<misc@zarb.org> <misc@ephaone.org>
<misc@zarb.org> <mscherer@users.noreply.github.com>
James Martin <jmartin@ansible.com> <jmartin@basho.com>
James Laska <jlaska@ansible.com> <jlaska@redhat.com>
James Laska <jlaska@ansible.com> <jlaska@ansibleworks.com>
James Laska <jlaska@ansible.com> <jlaska@James-Laskas-MacBook-Pro.local>
James Laska <jlaska@ansible.com> <jlaska@users.noreply.github.com>
Jason McKerr <mckerrj@gmail.com> <jmckerr@jmckerr-OSX.local>
Chris Houseknecht <chouseknecht@ansible.com>
Chris Houseknecht <chouseknecht@ansible.com> chouseknecht <chouse@ansible.com>
Chris Houseknecht <chouseknecht@ansible.com> Chris Houseknecht <chouse@ansibleworks.com>
Stephen Fromm <sfromm@gmail.com> Stephen Fromm <stephenf@nero.net>
Sandra Wills <docschick@ansible.com> Sandra Wills <swills@ansible.com>
Will Thames <will@thames.id.au> willthames <will@thames.id.au>
Will Thames <will@thames.id.au> Will Thames <willdthames@gmail.com>
Will Thames <will@thames.id.au> willthames <willdthames@gmail.com>
Will Thames <will@thames.id.au> willthames <will@musc.org.uk>
Will Thames <will@thames.id.au> u348095 <will.thames@suncorp.com.au>
Will Thames <will@thames.id.au> willthames <will.thames@suncorp.com.au>
Will Thames <will@thames.id.au> Will Thames <will.thames@xvt.com.au>
nitzmahone <mdavis@ansible.com> Matt Davis <nitzmahone@users.noreply.github.com>
Dag Wieers <dag@wieers.com> Dag Wieërs <dag@wieers.com>
Dag Wieers <dag@wieers.com> Dag Wieers <dag.wieers@gmail.com>
Rene Moser <mail@renemoser.net> René Moser <mail@renemoser.net>
Rene Moser <mail@renemoser.net> Rene Moser <rene.moser@swisstxt.ch>

33
.travis.yml Normal file
View File

@ -0,0 +1,33 @@
sudo: false
language: python
matrix:
include:
- env: TOXENV=py24 INTEGRATION=no
- env: TOXENV=py26 INTEGRATION=yes
python: 2.6
- env: TOXENV=py27 INTEGRATION=yes
python: 2.7
- env: TOXENV=py34 INTEGRATION=no
python: 3.4
- env: TOXENV=py35 INTEGRATION=no
python: 3.5
addons:
apt:
sources:
- deadsnakes
packages:
- python2.4
install:
- pip install tox PyYAML Jinja2 sphinx
script:
# urllib2's defaults are not secure enough for us
- ./test/code-smell/replace-urlopen.sh .
- ./test/code-smell/use-compat-six.sh lib
- ./test/code-smell/boilerplate.sh
- ./test/code-smell/required-and-default-attributes.sh
- if test x"$TOXENV" != x'py24' ; then tox ; fi
- if test x"$TOXENV" = x'py24' ; then python2.4 -V && python2.4 -m compileall -fq -x 'module_utils/(a10|rax|openstack|ec2|gce).py' lib/ansible/module_utils ; fi
#- make -C docsite all
- if test x"$INTEGRATION" = x'yes' ; then source ./hacking/env-setup && cd test/integration/ && make parsing && make test_var_precedence && make unicode ; fi
after_success:
- coveralls

2120
CHANGELOG.md Normal file

File diff suppressed because it is too large Load Diff

319
CODING_GUIDELINES.md Normal file
View File

@ -0,0 +1,319 @@
Coding Guidelines
=================
Hi! Thanks for interest in contributing to Ansible.
Here are some guidelines for contributing code. The purpose of this document are to establish what we're looking for in code contributions, and to make sure
new contributions know some of the conventions that we've been using.
We don't think much of this should be too strange to readers familiar with contributing to Python projects, though it helps if we all get on the same page.
Language
========
* While not all components of Ansible must be in Python, core contributions to the Ansible repo must be written in Python. This is to maximize the ability of everyone to contribute.
* If you want to write non-Python ansible modules or inventory scripts, that's fine, but they are not going to get merged in most likely. Sorry!!
PEP8 and basic style checks
===========================
* PEP8 is a great Python style guide, which you should read.
* PEP8 must not be strictly followed in all aspects, but most of it is good advice
* In particular, we don't really care about line lengths. Buy a bigger monitor!
* To run checks for things we care about, run "make pep8"
* Similarly, additional checks can be made with "make pyflakes"
* There is no need to submit code changes for pep8 and pyflake fixes, as these break attribution history. Project leadership will make these periodically.
* Do not submit pull requests that simply adjust whitespace in the code
Testing
=======
* Much of ansible's testing needs are in integration, not unit tests. Add module tests there.
* That being said, there are unit tests too!
* Code written must absolutely pass tests (i.e. "make tests")
* You should anticipate any error paths in your code and test down those error paths.
* Additions to tests for core code is welcome, but not always possible. Be sure things are at least well tested manually in that case.
Whitespace
==========
* Four space indent is strictly required
* Include meaningful whitespace between lines of code
Shebang Lines
=============
* /usr/bin/scripts should start with '/usr/bin/env python'
* module code should still use '/usr/bin/python' as this is replaced automatically by 'ansible_python_interpreter', see the FAQ in the docs for more info.
Comments
========
* Readability is one of the most important goals for this project
* Comment any non-trivial code where someone might not know why you are doing something in a particular way
* Though if something should be commented, that's often a sign someone should write a function
* All new functions must have a basic docstring comment
* Commenting above a line is preferable to commenting at the end of a line
Classes
=======
* With the exception of module code (where inline is better), it is desirable to see classes in their own files.
* Classes should generally not cause side effects as soon as they are instantiated, move meaningful behavior to methods rather than constructors.
Functions and Methods
=====================
* In general, functions should not be 'too long' and should describe a meaningful amount of work
* When code gets too nested, that's usually the sign the loop body could benefit from being a function
* Parts of our existing code are not the best examples of this at times.
* Functions should have names that describe what they do, along with docstrings
* Functions should be named with_underscores
* "Don't repeat yourself" is generally a good philosophy
Variables
=========
* Use descriptive variable names instead of variables like 'x', unless x is a obvious loop index
* Ansible python code uses identifiers like 'ClassesLikeThis and variables_like_this
* Module parameters should also use_underscores and not runtogether
Module Security
===============
* Modules must take steps to avoid passing user input from the shell and always check return codes
* always use module.run_command instead of subprocess or Popen or os.system -- this is mandatory
* if you use need the shell you must pass use_unsafe_shell=True to module.run_command
* if you do not need the shell, avoid using the shell
* any variables that can come from the user input with use_unsafe_shell=True must be wrapped by pipes.quote(x)
* downloads of https:// resource urls must import module_utils.urls and use the fetch_url method
Misc Preferences
================
Use the dict constructor where possible when allocating dictionaries:
# not this:
foo = {
'a' : 12,
'b' : 34
}
# this:
foo = dict(
a = 12,
b = 34
)
Line up variables
# not this
a = 12
foosball = 34
xyz = 'dog'
# this
a = 12
foosball = 34
xyz = 'dog'
Don't use line continuations:
# no
if (this_is_a_very_long_line and foo and \
i_am_going_to_continue_it):
bar()
# better:
if (this_is_a_very_long_line and foo and i_am_going_to_continue_it):
bar()
Spacing:
# no
x=[1,2,3]
# no
x = [1,2,3]
# yes
x = [ 1, 2, 3 ]
Spacing continued:
# no
x=foo(12)
# no
x = foo( 12 )
# yes
x = foo(12)
Licenses
========
Every file should have a license header, including the copyright of the original author. Major additions to the module are allowed
to add an additional copyright line, and this is especially true of rewrites, but original authorship copyright messages should be preserved.
All contributions to the core repo should preserve original licenses and new contributions must include the GPLv3 header.
Module Documentation
====================
All module pull requests must include a DOCUMENTATION docstring (YAML format,
see other modules for examples) as well as an EXAMPLES docstring, which is free form.
When adding new modules, any new parameter must have a "version_added" attribute.
When submitting a new module, the module should have a "version_added" attribute in the
pull request as well, set to the current development version.
Be sure to check grammar and spelling.
It's frequently the case that modules get submitted with YAML that isn't valid,
so you can run "make webdocs" from the checkout to preview your module's documentation.
If it fails to build, take a look at your DOCUMENTATION string
or you might have a Python syntax error in there too.
Python Imports
==============
To make it clear what a module is importing, imports should not be sprinkled throughout the code.
Python Imports should happen at the top of the file, exempting code from module_utils.
When a conditional runtime import is required, do so something like this instead:
HAS_FOO = False
try:
import foo
HAS_FOO = True
except ImportError:
pass
...
if not HAS_FOO:
raise Exception("the foo library is required")
This makes it clear what optional dependencies are but allows this to be deferred until runtime. In the case of module code, the raising of the Exception will be replaced
with a "module.exit_json" call.
Exceptions
==========
In the main body of the code, use typed exceptions where possible:
# not this
raise Exception("panic!")
# this
from ansible import errors
...
raise errors.AnsibleError("panic!")
Similarly, exception checking should be fine grained:
# not this
try:
foo()
except:
bar()
# but this
try:
foo()
except SomeTypedException:
bar()
List Comprehensions
===================
In general list comprehensions are always preferred to map() and filter() calls.
However, they can be abused. Optimize for readability, and avoid nesting them too deeply.
Regexes
=======
There is a time and place for them, but here's an illustrative joke.
"A developer had a problem, and used a regular expression to solve it. Now the developer had two problems".
Often regexes are difficult to maintain, and a trusty call to other string operations can be a great solution, faster,
and more readable.
File Conventions
================
If a piece of code looks for a named YAML file in a directory, it should assume it can take no extension, or an extension of '.yml' or '.yaml'.
This should be true against all code that loads files.
Any code that uses directories should consider the possibility that the directory may be symlink.
New Ansible language parameters
===============================
If adding a new parameter, like 'can_fizzbuzz: True/False' be sure the value of the parameter is templated somewhere in the Runner code, as if anything can be parameterized in Ansible,
there is a user that will try to parameterize it.
String Find
===========
Use 'in':
# not this:
if x.find('foo') != -1:
# this:
if 'foo' in x:
String checks
=============
To test if something is a string, consider that it may be unicode.
# no
if type(x) == str:
# yes
if isinstance(x, basestring):
Cleverness
==========
Ansible's code is intended to be read by as many people as possible, so we don't particularly encourage clever or heavily idiomatic code.
In particular, metaclasses are probably not appropriate, however entertaining they may be to add.
Git Practices
=============
Pull requests cannot be accepted that contain merge commits.
Always do "git pull --rebase" and "git rebase" vs "git pull" or "git merge".
Always create a new branch for each pull request to avoid intertwingling different features or fixes on the same branch.
Python Version Compliance
=========================
All code in Ansible core must support a minimum version of Python 2.6.
Module code must support a minimum of Python 2.4, with occasional exception for modules that require code that themselves require 2.6 and later.
A quick reminder is that list comprehensions in Python 2.4 are not as fully fleshed out, there are no 'dict' comprehensions, and there is no 'with' statement.
But otherwise it's pretty much all the same.
The End
=======
This was not meant to be a scary document, so we hope it wasn't, but we also hope this helps you write code that is easier to maintain by others in the future.
If you have questions about this document, please ask on the ansible-devel mailing list.
Thank you!

27
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,27 @@
Welcome To Ansible GitHub
=========================
Hi! Nice to see you here!
If you'd like to ask a question
===============================
Please see [this web page ](http://docs.ansible.com/community.html) for community information, which includes pointers on how to ask questions on the [mailing lists](http://docs.ansible.com/community.html#mailing-list-information) and IRC.
The github issue tracker is not the best place for questions for various reasons, but both IRC and the mailing list are very helpful places for those things, and that page has the pointers to those.
If you'd like to contribute code
================================
Please see [this web page](http://docs.ansible.com/community.html) for information about the contribution process. Important license agreement information is also included on that page.
If you'd like to file a bug
===========================
I'd also read the community page above, but in particular, make sure you copy [this issue template](https://github.com/ansible/ansible/blob/devel/ISSUE_TEMPLATE.md) into your ticket description. We have a friendly neighborhood bot that will remind you if you forget :) This template helps us organize tickets faster and prevents asking some repeated questions, so it's very helpful to us and we appreciate your help with it.
Also please make sure you are testing on the latest released version of Ansible or the development branch.
Thanks!

39
ISSUE_TEMPLATE.md Normal file
View File

@ -0,0 +1,39 @@
##### Issue Type:
Can you help us out in labelling this by telling us what kind of ticket this this? You can say:
- Bug Report
- Feature Idea
- Feature Pull Request
- New Module Pull Request
- Bugfix Pull Request
- Documentation Report
- Docs Pull Request
##### Ansible Version:
Let us know what version of Ansible you are using. Please supply the verbatim output from running “ansible --version”. If you're filing a ticket on a version of Ansible which is not the latest, we'd greatly appreciate it if you could retest on the latest version first. We don't expect you to test against the development branch most of the time, but we may ask for that if you have cycles. Thanks!
##### Ansible Configuration:
What have you changed about your Ansible installation? What configuration settings have you changed/added/removed? Compare your /etc/ansible/ansible.cfg against a clean version from Github and let us know what's different.
##### Environment:
What OS are you running Ansible from and what OS are you managing? Examples include RHEL 5/6, Centos 5/6, Ubuntu 12.04/13.10, *BSD, Solaris. If this is a generic feature request or it doesn’t apply, just say “N/A”. Not all tickets may be about operating system related things and we understand that.
##### Summary:
Please summarize your request in this space. You will earn bonus points for being succinct, but please add enough detail so we can understand the request. Thanks!
##### Steps To Reproduce:
If this is a bug ticket, please enter the steps you use to reproduce the problem in the space below. If this is a feature request, please enter the steps you would use to use the feature. If an example playbook is useful, please include a short reproducer inline, indented by four spaces. If a longer one is necessary, linking to one uploaded to gist.github.com would be great. Much appreciated!
##### Expected Results:
Please enter your expected results in this space. When running the steps supplied above in the previous section, what did you expect to happen? If showing example output, please indent your output by four spaces so it will render correctly in GitHub's viewer thingy.
##### Actual Results:
Please enter your actual results in this space. When running the steps supplied above, what actually happened? If you are showing example output, please indent your output by four spaces so it will render correctly in GitHub. Thanks again!

View File

@ -1,51 +1,24 @@
include README.rst
include COPYING
include SYMLINK_CACHE.json
include requirements.txt
recursive-include docs *
include docs/docsite/rst/collections/all_plugins.rst
exclude docs/docsite/rst_warnings
exclude docs/docsite/rst/conf.py
exclude docs/docsite/rst/index.rst
exclude docs/docsite/rst/dev_guide/index.rst
exclude docs/docsite/rst/dev_guide/testing/sanity/bin-symlinks.rst
exclude docs/docsite/rst/dev_guide/testing/sanity/botmeta.rst
exclude docs/docsite/rst/dev_guide/testing/sanity/integration-aliases.rst
exclude docs/docsite/rst/dev_guide/testing/sanity/release-names.rst
recursive-exclude docs/docsite/_build *
recursive-exclude docs/docsite/_extensions *.pyc *.pyo
prune v2
prune docsite
prune ticket_stubs
prune packaging
prune test
prune hacking
include README.md COPYING
include examples/hosts
include examples/ansible.cfg
include examples/scripts/ConfigureRemotingForAnsible.ps1
include examples/scripts/upgrade_to_ps3.ps1
include lib/ansible/keyword_desc.yml
recursive-include lib/ansible/executor/powershell *.ps1
recursive-include lib/ansible/module_utils/csharp *.cs
recursive-include lib/ansible/module_utils/powershell *.psm1
recursive-include lib/ansible/modules/windows *.ps1
recursive-include lib/ansible/galaxy/data *.yml *.j2 README.md ansible.cfg inventory .git_keep
recursive-include lib/ansible/config *.yml
recursive-include licenses *.txt
include lib/ansible/module_utils/powershell.ps1
recursive-include lib/ansible/modules *
recursive-include lib/ansible/galaxy/data *
recursive-include docs *
recursive-include packaging *
recursive-include test/ansible_test *.py Makefile
recursive-include test/integration *
recursive-include test/lib/ansible_test/config *.yml *.template
recursive-include test/lib/ansible_test/_data *.cfg *.in *.ini *.ps1 *.txt *.yml coveragerc
recursive-include test/lib/ansible_test/_util *.cfg *.ini *.json *.ps1 *.psd1 *.py *.sh *.txt *.yml
recursive-include test/lib/ansible_test/_util/controller/sanity/validate-modules validate-modules
recursive-include test/sanity *.in *.json *.py *.txt
recursive-include test/support *.py *.ps1 *.psm1 *.cs
exclude test/sanity/code-smell/botmeta.*
exclude test/sanity/code-smell/release-names.*
exclude test/lib/ansible_test/_internal/commands/sanity/bin_symlinks.py
exclude test/lib/ansible_test/_internal/commands/sanity/integration_aliases.py
recursive-include test/units *
include Makefile
include VERSION
include MANIFEST.in
include changelogs/CHANGELOG*.rst
include changelogs/changelog.yaml
recursive-include hacking/build_library *.py
include hacking/build-ansible.py
include hacking/test-module.py
include hacking/update-sanity-requirements.py
include bin/*
include CHANGELOG.md
include contrib/README.md
recursive-include contrib/inventory *
exclude lib/ansible/modules/core/.git*
exclude lib/ansible/modules/extras/.git*
prune lib/ansible/modules/core/.git
prune lib/ansible/modules/extras/.git

289
Makefile
View File

@ -1,154 +1,267 @@
#!/usr/bin/make
# WARN: gmake syntax
########################################################
# Makefile for Ansible
#
# useful targets:
# make clean ---------------- clean up
# make sdist ---------------- produce a tarball
# make tests ---------------- run the tests (see https://docs.ansible.com/ansible/devel/dev_guide/testing_units.html for requirements)
# make srpm ----------------- produce a SRPM
# make rpm ----------------- produce RPMs
# make deb-src -------------- produce a DEB source
# make deb ------------------ produce a DEB
# make docs ----------------- rebuild the manpages (results are checked in)
# make tests ---------------- run the tests (see test/README.md for requirements)
# make pyflakes, make pep8 -- source code checks
########################################################
# variable section
NAME = ansible-core
NAME = ansible
OS = $(shell uname -s)
PREFIX ?= '/usr/local'
SDIST_DIR ?= 'dist'
# Manpages are currently built with asciidoc -- would like to move to markdown
# This doesn't evaluate until it's called. The -D argument is the
# directory of the target file ($@), kinda like `dirname`.
MANPAGES ?= $(patsubst %.rst.in,%,$(wildcard ./docs/man/man1/ansible*.1.rst.in))
ifneq ($(shell which rst2man 2>/dev/null),)
ASCII2MAN = rst2man $< $@
else ifneq ($(shell which rst2man.py 2>/dev/null),)
ASCII2MAN = rst2man.py $< $@
MANPAGES := docs/man/man1/ansible.1 docs/man/man1/ansible-playbook.1 docs/man/man1/ansible-pull.1 docs/man/man1/ansible-doc.1 docs/man/man1/ansible-galaxy.1 docs/man/man1/ansible-vault.1
ifneq ($(shell which a2x 2>/dev/null),)
ASCII2MAN = a2x -D $(dir $@) -d manpage -f manpage $<
ASCII2HTMLMAN = a2x -D docs/html/man/ -d manpage -f xhtml
else
ASCII2MAN = @echo "ERROR: rst2man from docutils command is not installed but is required to build $(MANPAGES)" && exit 1
ASCII2MAN = @echo "ERROR: AsciiDoc 'a2x' command is not installed but is required to build $(MANPAGES)" && exit 1
endif
PYTHON ?= python
GENERATE_CLI = hacking/build-ansible.py generate-man
PYTHON=python
SITELIB = $(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
# fetch version from project release.py as single source-of-truth
VERSION := $(shell $(PYTHON) packaging/release/versionhelper/version_helper.py --raw || echo error)
ifeq ($(findstring error,$(VERSION)), error)
$(error "version_helper failed")
# VERSION file provides one place to update the software version
VERSION := $(shell cat VERSION | cut -f1 -d' ')
RELEASE := $(shell cat VERSION | cut -f2 -d' ')
# Get the branch information from git
ifneq ($(shell which git),)
GIT_DATE := $(shell git log -n 1 --format="%ai")
GIT_HASH := $(shell git log -n 1 --format="%h")
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD | sed 's/[-_.\/]//g')
GITINFO = .$(GIT_HASH).$(GIT_BRANCH)
else
GITINFO = ""
endif
# ansible-test parameters
ANSIBLE_TEST ?= bin/ansible-test
TEST_FLAGS ?=
ifeq ($(shell echo $(OS) | egrep -c 'Darwin|FreeBSD|OpenBSD'),1)
DATE := $(shell date -j -r $(shell git log -n 1 --format="%at") +%Y%m%d%H%M)
else
DATE := $(shell date --utc --date="$(GIT_DATE)" +%Y%m%d%H%M)
endif
# ansible-test units parameters (make test / make test-py3)
PYTHON_VERSION ?= $(shell python2 -c 'import sys; print("%s.%s" % sys.version_info[:2])')
PYTHON3_VERSION ?= $(shell python3 -c 'import sys; print("%s.%s" % sys.version_info[:2])')
# DEB build parameters
DEBUILD_BIN ?= debuild
DEBUILD_OPTS = --source-option="-I"
DPUT_BIN ?= dput
DPUT_OPTS ?=
DEB_DATE := $(shell LC_TIME=C date +"%a, %d %b %Y %T %z")
ifeq ($(OFFICIAL),yes)
DEB_RELEASE = $(RELEASE)ppa
# Sign OFFICIAL builds using 'DEBSIGN_KEYID'
# DEBSIGN_KEYID is required when signing
ifneq ($(DEBSIGN_KEYID),)
DEBUILD_OPTS += -k$(DEBSIGN_KEYID)
endif
else
DEB_RELEASE = 0.git$(DATE)$(GITINFO)
# Do not sign unofficial builds
DEBUILD_OPTS += -uc -us
DPUT_OPTS += -u
endif
DEBUILD = $(DEBUILD_BIN) $(DEBUILD_OPTS)
DEB_PPA ?= ppa
# Choose the desired Ubuntu release: lucid precise saucy trusty
DEB_DIST ?= unstable
# ansible-test integration parameters (make integration)
IMAGE ?= centos7
TARGET ?=
# RPM build parameters
RPMSPECDIR= packaging/rpm
RPMSPEC = $(RPMSPECDIR)/ansible.spec
RPMDIST = $(shell rpm --eval '%{?dist}')
RPMRELEASE = $(RELEASE)
ifneq ($(OFFICIAL),yes)
RPMRELEASE = 0.git$(DATE)$(GITINFO)
endif
RPMNVR = "$(NAME)-$(VERSION)-$(RPMRELEASE)$(RPMDIST)"
# MOCK build parameters
MOCK_BIN ?= mock
MOCK_CFG ?=
NOSETESTS ?= nosetests
NOSETESTS3 ?= nosetests-3.4
########################################################
.PHONY: all
all: clean python
.PHONY: tests
tests:
$(ANSIBLE_TEST) units -v --python $(PYTHON_VERSION) $(TEST_FLAGS)
PYTHONPATH=./lib $(NOSETESTS) -d -w test/units -v --with-coverage --cover-package=ansible --cover-branches
.PHONY: tests-py3
tests-py3:
$(ANSIBLE_TEST) units -v --python $(PYTHON3_VERSION) $(TEST_FLAGS)
PYTHONPATH=./lib $(NOSETESTS3) -d -w test/units -v --with-coverage --cover-package=ansible --cover-branches
.PHONY: integration
integration:
$(ANSIBLE_TEST) integration -v --docker $(IMAGE) $(TARGET) $(TEST_FLAGS)
authors:
sh hacking/authors.sh
# Regenerate %.1.rst if %.1.rst.in has been modified more
# recently than %.1.rst.
%.1.rst: %.1.rst.in
# Regenerate %.1.asciidoc if %.1.asciidoc.in has been modified more
# recently than %.1.asciidoc.
%.1.asciidoc: %.1.asciidoc.in
sed "s/%VERSION%/$(VERSION)/" $< > $@
rm $<
# Regenerate %.1 if %.1.rst or release.py has been modified more
# recently than %.1. (Implicitly runs the %.1.rst recipe)
%.1: %.1.rst lib/ansible/release.py
# Regenerate %.1 if %.1.asciidoc or VERSION has been modified more
# recently than %.1. (Implicitly runs the %.1.asciidoc recipe)
%.1: %.1.asciidoc VERSION
$(ASCII2MAN)
.PHONY: clean
loc:
sloccount lib library bin
pep8:
@echo "#############################################"
@echo "# Running PEP8 Compliance Tests"
@echo "#############################################"
-pep8 -r --ignore=E501,E221,W291,W391,E302,E251,E203,W293,E231,E303,E201,E225,E261,E241 lib/ bin/
# -pep8 -r --ignore=E501,E221,W291,W391,E302,E251,E203,W293,E231,E303,E201,E225,E261,E241 --filename "*" library/
pyflakes:
pyflakes lib/ansible/*.py lib/ansible/*/*.py bin/*
clean:
@echo "Cleaning up distutils stuff"
rm -rf build
rm -rf dist
rm -rf lib/ansible*.egg-info/
rm -rf lib/ansible.egg-info/
@echo "Cleaning up byte compiled python stuff"
find . -type f -regex ".*\.py[co]$$" -delete
find . -type d -name "__pycache__" -delete
@echo "Cleaning up editor backup files"
find . -type f -not -path ./test/units/inventory_test_data/group_vars/noparse/all.yml~ \( -name "*~" -or -name "#*" \) -delete
find . -type f \( -name "*.swp" \) -delete
@echo "Cleaning up manpage stuff"
find ./docs/man -type f -name "*.xml" -delete
find ./docs/man -type f -name "*.rst" -delete
find ./docs/man -type f -name "*.asciidoc" -delete
find ./docs/man/man3 -type f -name "*.3" -delete
rm -f ./docs/man/man1/*
@echo "Cleaning up output from test runs"
rm -rf test/test_data
rm -rf logs/
rm -rf .cache/
rm -f test/units/.coverage*
rm -rf test/results/*/*
find test/ -type f -name '*.retry' -delete
@echo "Cleaning up symlink cache"
rm -f SYMLINK_CACHE.json
@echo "Cleaning up RPM building stuff"
rm -rf MANIFEST rpm-build
@echo "Cleaning up Debian building stuff"
rm -rf debian
rm -rf deb-build
rm -rf docs/json
rm -rf docs/js
@echo "Cleaning up docsite"
$(MAKE) -C docs/docsite clean
@echo "Cleaning up authors file"
rm -f AUTHORS.TXT
find . -type f -name '*.pyc' -delete
.PHONY: python
python:
$(PYTHON) setup.py build
.PHONY: install
install:
$(PYTHON) setup.py install
install_manpages:
gzip -9 $(wildcard ./docs/man/man1/ansible*.1)
cp $(wildcard ./docs/man/man1/ansible*.1.gz) $(PREFIX)/man/man1/
sdist: clean docs
$(PYTHON) setup.py sdist
.PHONY: sdist_check
sdist_check:
$(PYTHON) -c 'import setuptools, sys; sys.exit(int(not (tuple(map(int, setuptools.__version__.split("."))) > (39, 2, 0))))'
$(PYTHON) packaging/sdist/check-link-behavior.py
.PHONY: sdist
sdist: sdist_check clean docs
_ANSIBLE_SDIST_FROM_MAKEFILE=1 $(PYTHON) setup.py sdist --dist-dir=$(SDIST_DIR)
# Official releases generate the changelog as the last commit before the release.
# Snapshots shouldn't result in new checkins so the changelog is generated as
# part of creating the tarball.
.PHONY: snapshot
snapshot: sdist_check clean docs changelog
_ANSIBLE_SDIST_FROM_MAKEFILE=1 $(PYTHON) setup.py sdist --dist-dir=$(SDIST_DIR)
.PHONY: sdist_upload
sdist_upload: clean docs
$(PYTHON) setup.py sdist upload 2>&1 |tee upload.log
.PHONY: changelog
changelog:
PYTHONPATH=./lib antsibull-changelog release -vv --use-ansible-doc && PYTHONPATH=./lib antsibull-changelog generate -vv --use-ansible-doc
rpmcommon: $(MANPAGES) sdist
@mkdir -p rpm-build
@cp dist/*.gz rpm-build/
@sed -e 's#^Version:.*#Version: $(VERSION)#' -e 's#^Release:.*#Release: $(RPMRELEASE)%{?dist}#' $(RPMSPEC) >rpm-build/$(NAME).spec
.PHONY: generate_rst
generate_rst: lib/ansible/cli/*.py
mkdir -p ./docs/man/man1/ ; \
$(PYTHON) $(GENERATE_CLI) --template-file=docs/templates/man.j2 --output-dir=docs/man/man1/ --output-format man lib/ansible/cli/*.py
mock-srpm: /etc/mock/$(MOCK_CFG).cfg rpmcommon
$(MOCK_BIN) -r $(MOCK_CFG) --resultdir rpm-build/ --buildsrpm --spec rpm-build/$(NAME).spec --sources rpm-build/
@echo "#############################################"
@echo "Ansible SRPM is built:"
@echo rpm-build/*.src.rpm
@echo "#############################################"
docs: generate_rst
$(MAKE) $(MANPAGES)
mock-rpm: /etc/mock/$(MOCK_CFG).cfg mock-srpm
$(MOCK_BIN) -r $(MOCK_CFG) --resultdir rpm-build/ --rebuild rpm-build/$(NAME)-*.src.rpm
@echo "#############################################"
@echo "Ansible RPM is built:"
@echo rpm-build/*.noarch.rpm
@echo "#############################################"
version:
@echo $(VERSION)
srpm: rpmcommon
@rpmbuild --define "_topdir %(pwd)/rpm-build" \
--define "_builddir %{_topdir}" \
--define "_rpmdir %{_topdir}" \
--define "_srcrpmdir %{_topdir}" \
--define "_specdir $(RPMSPECDIR)" \
--define "_sourcedir %{_topdir}" \
-bs rpm-build/$(NAME).spec
@rm -f rpm-build/$(NAME).spec
@echo "#############################################"
@echo "Ansible SRPM is built:"
@echo " rpm-build/$(RPMNVR).src.rpm"
@echo "#############################################"
rpm: rpmcommon
@rpmbuild --define "_topdir %(pwd)/rpm-build" \
--define "_builddir %{_topdir}" \
--define "_rpmdir %{_topdir}" \
--define "_srcrpmdir %{_topdir}" \
--define "_specdir $(RPMSPECDIR)" \
--define "_sourcedir %{_topdir}" \
--define "_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" \
--define "__python `which $(PYTHON)`" \
-ba rpm-build/$(NAME).spec
@rm -f rpm-build/$(NAME).spec
@echo "#############################################"
@echo "Ansible RPM is built:"
@echo " rpm-build/$(RPMNVR).noarch.rpm"
@echo "#############################################"
debian: sdist
@for DIST in $(DEB_DIST) ; do \
mkdir -p deb-build/$${DIST} ; \
tar -C deb-build/$${DIST} -xvf dist/$(NAME)-$(VERSION).tar.gz ; \
cp -a packaging/debian deb-build/$${DIST}/$(NAME)-$(VERSION)/ ; \
sed -ie "s|%VERSION%|$(VERSION)|g;s|%RELEASE%|$(DEB_RELEASE)|;s|%DIST%|$${DIST}|g;s|%DATE%|$(DEB_DATE)|g" deb-build/$${DIST}/$(NAME)-$(VERSION)/debian/changelog ; \
done
deb: debian
@for DIST in $(DEB_DIST) ; do \
(cd deb-build/$${DIST}/$(NAME)-$(VERSION)/ && $(DEBUILD) -b) ; \
done
@echo "#############################################"
@echo "Ansible DEB artifacts:"
@for DIST in $(DEB_DIST) ; do \
echo deb-build/$${DIST}/$(NAME)_$(VERSION)-$(DEB_RELEASE)~$${DIST}_amd64.changes ; \
done
@echo "#############################################"
deb-src: debian
@for DIST in $(DEB_DIST) ; do \
(cd deb-build/$${DIST}/$(NAME)-$(VERSION)/ && $(DEBUILD) -S) ; \
done
@echo "#############################################"
@echo "Ansible DEB artifacts:"
@for DIST in $(DEB_DIST) ; do \
echo deb-build/$${DIST}/$(NAME)_$(VERSION)-$(DEB_RELEASE)~$${DIST}_source.changes ; \
done
@echo "#############################################"
deb-upload: deb
@for DIST in $(DEB_DIST) ; do \
$(DPUT_BIN) $(DPUT_OPTS) $(DEB_PPA) deb-build/$${DIST}/$(NAME)_$(VERSION)-$(DEB_RELEASE)~$${DIST}_amd64.changes ; \
done
deb-src-upload: deb-src
@for DIST in $(DEB_DIST) ; do \
$(DPUT_BIN) $(DPUT_OPTS) $(DEB_PPA) deb-build/$${DIST}/$(NAME)_$(VERSION)-$(DEB_RELEASE)~$${DIST}_source.changes ; \
done
# for arch or gentoo, read instructions in the appropriate 'packaging' subdirectory directory
webdocs: $(MANPAGES)
(cd docsite/; make docs)
docs: $(MANPAGES)

58
README.md Normal file
View File

@ -0,0 +1,58 @@
[![PyPI version](https://img.shields.io/pypi/v/ansible.svg)](https://pypi.python.org/pypi/ansible)
[![PyPI downloads](https://img.shields.io/pypi/dm/ansible.svg)](https://pypi.python.org/pypi/ansible)
[![Build Status](https://travis-ci.org/ansible/ansible.svg?branch=devel)](https://travis-ci.org/ansible/ansible)
Ansible
=======
Ansible is a radically simple IT automation system. It handles configuration-management, application deployment, cloud provisioning, ad-hoc task-execution, and multinode orchestration - including trivializing things like zero downtime rolling updates with load balancers.
Read the documentation and more at http://ansible.com/
Many users run straight from the development branch (it's generally fine to do so), but you might also wish to consume a release.
You can find instructions [here](http://docs.ansible.com/intro_getting_started.html) for a variety of platforms. If you decide to go with the development branch, be sure to run `git submodule update --init --recursive` after doing a checkout.
If you want to download a tarball of a release, go to [releases.ansible.com](http://releases.ansible.com/ansible), though most users use `yum` (using the EPEL instructions linked above), `apt` (using the PPA instructions linked above), or `pip install ansible`.
Design Principles
=================
* Have a dead simple setup process and a minimal learning curve
* Manage machines very quickly and in parallel
* Avoid custom-agents and additional open ports, be agentless by leveraging the existing SSH daemon
* Describe infrastructure in a language that is both machine and human friendly
* Focus on security and easy auditability/review/rewriting of content
* Manage new remote machines instantly, without bootstrapping any software
* Allow module development in any dynamic language, not just Python
* Be usable as non-root
* Be the easiest IT automation system to use, ever.
Get Involved
============
* Read [Community Information](http://docs.ansible.com/community.html) for all kinds of ways to contribute to and interact with the project, including mailing list information and how to submit bug reports and code to Ansible.
* All code submissions are done through pull requests. Take care to make sure no merge commits are in the submission, and use `git rebase` vs `git merge` for this reason. If submitting a large code change (other than modules), it's probably a good idea to join ansible-devel and talk about what you would like to do or add first and to avoid duplicate efforts. This not only helps everyone know what's going on, it also helps save time and effort if we decide some changes are needed.
* Users list: [ansible-project](http://groups.google.com/group/ansible-project)
* Development list: [ansible-devel](http://groups.google.com/group/ansible-devel)
* Announcement list: [ansible-announce](http://groups.google.com/group/ansible-announce) - read only
* irc.freenode.net: #ansible
Branch Info
===========
* Releases are named after Led Zeppelin songs. (Releases prior to 2.0 were named after Van Halen songs.)
* The devel branch corresponds to the release actively under development.
* As of 1.8, modules are kept in different repos, you'll want to follow [core](https://github.com/ansible/ansible-modules-core) and [extras](https://github.com/ansible/ansible-modules-extras)
* Various release-X.Y branches exist for previous releases.
* We'd love to have your contributions, read [Community Information](http://docs.ansible.com/community.html) for notes on how to get started.
Authors
=======
Ansible was created by [Michael DeHaan](https://github.com/mpdehaan) (michael.dehaan/gmail/com) and has contributions from over 1000 users (and growing). Thanks everyone!
Ansible is sponsored by [Ansible, Inc](http://ansible.com)

View File

@ -1,115 +0,0 @@
|PyPI version| |Docs badge| |Chat badge| |Build Status| |Code Of Conduct| |Mailing Lists| |License| |CII Best Practices|
*******
Ansible
*******
Ansible is a radically simple IT automation system. It handles
configuration management, application deployment, cloud provisioning,
ad-hoc task execution, network automation, and multi-node orchestration. Ansible makes complex
changes like zero-downtime rolling updates with load balancers easy. More information on the Ansible `website <https://ansible.com/>`_.
Design Principles
=================
* Have an extremely simple setup process with a minimal learning curve.
* Manage machines quickly and in parallel.
* Avoid custom-agents and additional open ports, be agentless by
leveraging the existing SSH daemon.
* Describe infrastructure in a language that is both machine and human
friendly.
* Focus on security and easy auditability/review/rewriting of content.
* Manage new remote machines instantly, without bootstrapping any
software.
* Allow module development in any dynamic language, not just Python.
* Be usable as non-root.
* Be the easiest IT automation system to use, ever.
Use Ansible
===========
You can install a released version of Ansible with ``pip`` or a package manager. See our
`installation guide <https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html>`_ for details on installing Ansible
on a variety of platforms.
Power users and developers can run the ``devel`` branch, which has the latest
features and fixes, directly. Although it is reasonably stable, you are more likely to encounter
breaking changes when running the ``devel`` branch. We recommend getting involved
in the Ansible community if you want to run the ``devel`` branch.
Get Involved
============
* Read `Community
Information <https://docs.ansible.com/ansible/latest/community>`_ for all
kinds of ways to contribute to and interact with the project,
including mailing list information and how to submit bug reports and
code to Ansible.
* Join a `Working Group
<https://github.com/ansible/community/wiki>`_, an organized community devoted to a specific technology domain or platform.
* Submit a proposed code update through a pull request to the ``devel`` branch.
* Talk to us before making larger changes
to avoid duplicate efforts. This not only helps everyone
know what is going on, but it also helps save time and effort if we decide
some changes are needed.
* For a list of email lists, IRC channels and Working Groups, see the
`Communication page <https://docs.ansible.com/ansible/latest/community/communication.html>`_
Coding Guidelines
=================
We document our Coding Guidelines in the `Developer Guide <https://docs.ansible.com/ansible/devel/dev_guide/>`_. We particularly suggest you review:
* `Contributing your module to Ansible <https://docs.ansible.com/ansible/devel/dev_guide/developing_modules_checklist.html>`_
* `Conventions, tips, and pitfalls <https://docs.ansible.com/ansible/devel/dev_guide/developing_modules_best_practices.html>`_
Branch Info
===========
* The ``devel`` branch corresponds to the release actively under development.
* The ``stable-2.X`` branches correspond to stable releases.
* Create a branch based on ``devel`` and set up a `dev environment <https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html#common-environment-setup>`_ if you want to open a PR.
* See the `Ansible release and maintenance <https://docs.ansible.com/ansible/devel/reference_appendices/release_and_maintenance.html>`_ page for information about active branches.
Roadmap
=======
Based on team and community feedback, an initial roadmap will be published for a major or minor version (ex: 2.7, 2.8).
The `Ansible Roadmap page <https://docs.ansible.com/ansible/devel/roadmap/>`_ details what is planned and how to influence the roadmap.
Authors
=======
Ansible was created by `Michael DeHaan <https://github.com/mpdehaan>`_
and has contributions from over 5000 users (and growing). Thanks everyone!
`Ansible <https://www.ansible.com>`_ is sponsored by `Red Hat, Inc.
<https://www.redhat.com>`_
License
=======
GNU General Public License v3.0 or later
See `COPYING <COPYING>`_ to see the full text.
.. |PyPI version| image:: https://img.shields.io/pypi/v/ansible-core.svg
:target: https://pypi.org/project/ansible-core
.. |Docs badge| image:: https://img.shields.io/badge/docs-latest-brightgreen.svg
:target: https://docs.ansible.com/ansible/latest/
.. |Build Status| image:: https://dev.azure.com/ansible/ansible/_apis/build/status/CI?branchName=devel
:target: https://dev.azure.com/ansible/ansible/_build/latest?definitionId=20&branchName=devel
.. |Chat badge| image:: https://img.shields.io/badge/chat-IRC-brightgreen.svg
:target: https://docs.ansible.com/ansible/latest/community/communication.html
.. |Code Of Conduct| image:: https://img.shields.io/badge/code%20of%20conduct-Ansible-silver.svg
:target: https://docs.ansible.com/ansible/latest/community/code_of_conduct.html
:alt: Ansible Code of Conduct
.. |Mailing Lists| image:: https://img.shields.io/badge/mailing%20lists-Ansible-orange.svg
:target: https://docs.ansible.com/ansible/latest/community/communication.html#mailing-list-information
:alt: Ansible mailing lists
.. |License| image:: https://img.shields.io/badge/license-GPL%20v3.0-brightgreen.svg
:target: COPYING
:alt: Repository License
.. |CII Best Practices| image:: https://bestpractices.coreinfrastructure.org/projects/2372/badge
:target: https://bestpractices.coreinfrastructure.org/projects/2372
:alt: Ansible CII Best Practices certification

70
RELEASES.txt Normal file
View File

@ -0,0 +1,70 @@
Ansible Releases at a Glance
============================
Active Development
++++++++++++++++++
2.1 "TBD" - in progress
Released
++++++++
2.0.1 "Over the Hills and Far Away" TBD
2.0.0 "Over the Hills and Far Away" 01-12-2015
1.9.4 "Dancing In the Streets" 10-09-2015
1.9.3 "Dancing In the Streets" 09-03-2015
1.9.2 "Dancing In the Streets" 06-24-2015
1.9.1 "Dancing In the Streets" 04-27-2015
1.9.0 "Dancing In the Streets" 03-25-2015
1.8.4 "You Really Got Me" ---- 02-19-2015
1.8.3 "You Really Got Me" ---- 02-17-2015
1.8.2 "You Really Got Me" ---- 12-04-2014
1.8.1 "You Really Got Me" ---- 11-26-2014
1.7.2 "Summer Nights" -------- 09-24-2014
1.7.1 "Summer Nights" -------- 08-14-2014
1.7 "Summer Nights" -------- 08-06-2014
1.6.10 "The Cradle Will Rock" - 07-25-2014
1.6.9 "The Cradle Will Rock" - 07-24-2014
1.6.8 "The Cradle Will Rock" - 07-22-2014
1.6.7 "The Cradle Will Rock" - 07-21-2014
1.6.6 "The Cradle Will Rock" - 07-01-2014
1.6.5 "The Cradle Will Rock" - 06-25-2014
1.6.4 "The Cradle Will Rock" - 06-25-2014
1.6.3 "The Cradle Will Rock" - 06-09-2014
1.6.2 "The Cradle Will Rock" - 05-23-2014
1.6.1 "The Cradle Will Rock" - 05-07-2014
1.6 "The Cradle Will Rock" - 05-05-2014
1.5.5 "Love Walks In" -------- 04-18-2014
1.5.4 "Love Walks In" -------- 04-01-2014
1.5.3 "Love Walks In" -------- 03-13-2014
1.5.2 "Love Walks In" -------- 03-11-2014
1.5.1 "Love Walks In" -------- 03-10-2014
1.5 "Love Walks In" -------- 02-28-2014
1.4.5 "Could This Be Magic?" - 02-12-2014
1.4.4 "Could This Be Magic?" - 01-06-2014
1.4.3 "Could This Be Magic?" - 12-20-2013
1.4.2 "Could This Be Magic?" - 12-18-2013
1.4.1 "Could This Be Magic?" - 11-27-2013
1.4 "Could This Be Magic?" - 11-21-2013
1.3.4 "Top of the World" ----- 10-29-2013
1.3.3 "Top of the World" ----- 10-09-2013
1.3.2 "Top of the World" ----- 09-19-2013
1.3.1 "Top of the World" ----- 09-16-2013
1.3 "Top of the World" ----- 09-13-2013
1.2.3 "Hear About It Later" -- 08-21-2013
1.2.2 "Hear About It Later" -- 07-05-2013
1.2.1 "Hear About It Later" -- 07-04-2013
1.2 "Right Now" ------------ 06-10-2013
1.1 "Mean Street" ---------- 04-02-2013
1.0 "Eruption" ------------- 02-01-2013
0.9 "Dreams" --------------- 11-30-2012
0.8 "Cathedral" ------------ 10-19-2012
0.7 "Panama" --------------- 09-06-2012
0.6 "Cabo" ----------------- 08-06-2012
0.5 "Amsterdam" ------------ 07-04-2012
0.4 "Unchained" ------------ 05-23-2012
0.3 "Baluchitherium" ------- 04-23-2012
0.0.2 Untitled
0.0.1 Untitled

1
VERSION Normal file
View File

@ -0,0 +1 @@
2.0.1.0 0.2.network

View File

@ -1 +0,0 @@
../lib/ansible/cli/adhoc.py

115
bin/ansible Executable file
View File

@ -0,0 +1,115 @@
#!/usr/bin/env python
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
########################################################
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
__requires__ = ['ansible']
try:
import pkg_resources
except Exception:
# Use pkg_resources to find the correct versions of libraries and set
# sys.path appropriately when there are multiversion installs. But we
# have code that better expresses the errors in the places where the code
# is actually used (the deps are optional for many code paths) so we don't
# want to fail here.
pass
import os
import sys
import traceback
from ansible.errors import AnsibleError, AnsibleOptionsError, AnsibleParserError
from ansible.utils.display import Display
from ansible.utils.unicode import to_unicode
########################################
### OUTPUT OF LAST RESORT ###
class LastResort(object):
def display(self, msg):
print(msg, file=sys.stderr)
def error(self, msg, wrap_text=None):
print(msg, file=sys.stderr)
########################################
if __name__ == '__main__':
display = LastResort()
cli = None
me = os.path.basename(sys.argv[0])
try:
display = Display()
display.debug("starting run")
sub = None
try:
if me.find('-') != -1:
target = me.split('-')
if len(target) > 1:
sub = target[1]
myclass = "%sCLI" % sub.capitalize()
mycli = getattr(__import__("ansible.cli.%s" % sub, fromlist=[myclass]), myclass)
elif me == 'ansible':
from ansible.cli.adhoc import AdHocCLI as mycli
else:
raise AnsibleError("Unknown Ansible alias: %s" % me)
except ImportError as e:
if e.message.endswith(' %s' % sub):
raise AnsibleError("Ansible sub-program not implemented: %s" % me)
else:
raise
cli = mycli(sys.argv)
cli.parse()
sys.exit(cli.run())
except AnsibleOptionsError as e:
cli.parser.print_help()
display.error(to_unicode(e), wrap_text=False)
sys.exit(5)
except AnsibleParserError as e:
display.error(to_unicode(e), wrap_text=False)
sys.exit(4)
# TQM takes care of these, but leaving comment to reserve the exit codes
# except AnsibleHostUnreachable as e:
# display.error(str(e))
# sys.exit(3)
# except AnsibleHostFailed as e:
# display.error(str(e))
# sys.exit(2)
except AnsibleError as e:
display.error(to_unicode(e), wrap_text=False)
sys.exit(1)
except KeyboardInterrupt:
display.error("User interrupted execution")
sys.exit(99)
except Exception as e:
have_cli_options = cli is not None and cli.options is not None
display.error("Unexpected Exception: %s" % to_unicode(e), wrap_text=False)
if not have_cli_options or have_cli_options and cli.options.verbosity > 2:
display.display(u"the full traceback was:\n\n%s" % to_unicode(traceback.format_exc()))
else:
display.display("to see the full traceback, use -vvv")
sys.exit(250)

View File

@ -1 +0,0 @@
../lib/ansible/cli/config.py

View File

@ -1 +0,0 @@
../lib/ansible/cli/scripts/ansible_connection_cli_stub.py

View File

@ -1 +0,0 @@
../lib/ansible/cli/console.py

View File

@ -1 +1 @@
../lib/ansible/cli/doc.py
ansible

View File

@ -1 +1 @@
../lib/ansible/cli/galaxy.py
ansible

View File

@ -1 +0,0 @@
../lib/ansible/cli/inventory.py

View File

@ -1 +1 @@
../lib/ansible/cli/playbook.py
ansible

View File

@ -1 +1 @@
../lib/ansible/cli/pull.py
ansible

View File

@ -1 +0,0 @@
../test/lib/ansible_test/_util/target/cli/ansible_test_cli_stub.py

View File

@ -1 +1 @@
../lib/ansible/cli/vault.py
ansible

View File

@ -1,444 +0,0 @@
=========================================================
ansible-core 2.13 "Nobody's Fault but Mine" Release Notes
=========================================================
.. contents:: Topics
v2.13.2rc1
==========
Release Summary
---------------
| Release Date: 2022-07-11
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
Minor Changes
-------------
- ansible-test - An improved error message is shown when the download of a pip bootstrap script fails. The download now uses ``urllib2`` instead of ``urllib`` on Python 2.
Bugfixes
--------
- Move undefined check from concat to finalize (https://github.com/ansible/ansible/issues/78156)
- ansible-doc - no longer list module and plugin aliases that are created with symlinks (https://github.com/ansible/ansible/pull/78137).
- ansible-doc - when listing modules in collections, proceed recursively. This fixes module listing for community.general 5.x.y and community.network 4.x.y (https://github.com/ansible/ansible/pull/78137).
- ansible-doc will not add 'website for' in ":ref:" substitutions as it made them confusing.
- file backed cache plugins now handle concurrent access by making atomic updates to the files.
- password lookup does not ignore k=v arguments anymore.
- user - Fix error "Permission denied" in user module while generating SSH keys (https://github.com/ansible/ansible/issues/78017).
v2.13.1
=======
Release Summary
---------------
| Release Date: 2022-06-20
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
Minor Changes
-------------
- Add an 'action_plugin' field for modules in runtime.yml plugin_routing.
This fixes module_defaults by supporting modules-as-redirected-actions
without redirecting module_defaults entries to the common action.
.. code: yaml
plugin_routing:
action:
facts:
redirect: ns.coll.eos
command:
redirect: ns.coll.eos
modules:
facts:
redirect: ns.coll.eos_facts
command:
redirect: ns.coll.eos_command
With the runtime.yml above for ns.coll, a task such as
.. code: yaml
- hosts: all
module_defaults:
ns.coll.eos_facts: {'valid_for_eos_facts': 'value'}
ns.coll.eos_command: {'not_valid_for_eos_facts': 'value'}
tasks:
- ns.coll.facts:
will end up with defaults for eos_facts and eos_command
since both modules redirect to the same action.
To select an action plugin for a module without merging
module_defaults, define an action_plugin field for the resolved
module in the runtime.yml.
.. code: yaml
plugin_routing:
modules:
facts:
redirect: ns.coll.eos_facts
action_plugin: ns.coll.eos
command:
redirect: ns.coll.eos_command
action_plugin: ns.coll.eos
The action_plugin field can be a redirected action plugin, as
it is resolved normally.
Using the modified runtime.yml, the example task will only use
the ns.coll.eos_facts defaults.
- ansible-galaxy - Support resolvelib versions 0.6.x, 0.7.x, and 0.8.x. The full range of supported versions is now >= 0.5.3, < 0.9.0.
- ansible-test - Add RHEL 9.0 remote support.
- ansible-test - Add support for Ubuntu VMs using the ``--remote`` option.
- ansible-test - Add support for exporting inventory with ``ansible-test shell --export {path}``.
- ansible-test - Add support for multi-arch remotes.
- ansible-test - Add support for running non-interactive commands with ``ansible-test shell``.
- ansible-test - Avoid using the ``mock_use_standalone_module`` setting for unit tests running on Python 3.8 or later.
- ansible-test - Blocking mode is now enforced for stdin, stdout and stderr. If any of these are non-blocking then ansible-test will exit during startup with an error.
- ansible-test - Improve consistency of output messages by using stdout or stderr for most output, but not both.
- ansible-test - The ``shell`` command can be used outside a collection if no controller delegation is required.
Bugfixes
--------
- Add PyYAML >= 5.1 as a dependency of ansible-core to be compatible with Python 3.8+.
- ansible-config dump - Only display plugin type headers when plugin options are changed if --only-changed is specified.
- ansible-galaxy - handle unsupported versions of resolvelib gracefully.
- ansible-test - Fix internal validation of remote completion configuration.
- ansible-test - Prevent ``--target-`` prefixed options for the ``shell`` command from being combined with legacy environment options.
- ansible-test - Sanity test output with the ``--lint`` option is no longer mixed in with bootstrapping output.
- ansible-test - Subprocesses are now isolated from the stdin, stdout and stderr of ansible-test. This avoids issues with subprocesses tampering with the file descriptors, such as SSH making them non-blocking. As a result of this change, subprocess output from unit and integration tests on stderr now go to stdout.
- ansible-test - Subprocesses no longer have access to the TTY ansible-test is connected to, if any. This maintains consistent behavior between local testing and CI systems, which typically do not provide a TTY. Tests which require a TTY should use pexpect or another mechanism to create a PTY.
- apt module now correctly handles virtual packages.
- lookup plugin - catch KeyError when lookup returns dictionary (https://github.com/ansible/ansible/pull/77789).
- pip - fix cases where resolution of pip Python module fails when importlib.util has not already been imported
- plugin loader - Sort results when fuzzy matching plugin names (https://github.com/ansible/ansible/issues/77966).
- plugin loader will now load config data for plugin by name instead of by file to avoid issues with the same file being loaded under different names (fqcn + short name).
- psrp connection now handles default to inventory_hostname correctly.
- winrm connection now handles default to inventory_hostname correctly.
v2.13.0
=======
Release Summary
---------------
| Release Date: 2022-05-16
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
Major Changes
-------------
- Jinja2 Controller Requirement - Jinja2 3.0.0 or newer is required for the control node (the machine that runs Ansible) (https://github.com/ansible/ansible/pull/75881)
- Templating - remove ``safe_eval`` in favor of using ``NativeEnvironment`` but utilizing ``literal_eval`` only in cases when ``safe_eval`` was used (https://github.com/ansible/ansible/pull/75587)
Minor Changes
-------------
- Action Plugins - Add helper method for argument spec validation, and extend to pause and async_wrapper
- Added AIX root CA certs folders - enhance the TLS support in ``uri`` task on AIX
- Added ``module_utils.compat.typing`` to facilitate type-hinting on all supported Python versions.
- Ansible.Basic - small changes to allow use in PowerShell modules running on non-Windows platforms (https://github.com/ansible/ansible/pull/76924).
- AnsibleModule.run_command() now has a toggle to allow caller to decide to handle exceptions from executing the command itself
- Attach concat function to an environment class (https://github.com/ansible/ansible/pull/76282)
- Clarify in a comment that unrolling an iterator in ``Templar._finalize`` is actually necessary. Also switch to using the ``_unroll_iterator`` decorator directly to deduplicate code in ``Templar._finalize``. (https://github.com/ansible/ansible/pull/76436)
- Installation - modernize our python installation, to reduce dynamic code in setup.py, and migrate what is feasible to setup.cfg. This will enable shipping wheels in the future.
- PlayIterator - introduce public methods to access ``PlayIterator._host_states`` (https://github.com/ansible/ansible/pull/74416)
- PlayIterator - use enums for Iterating and Failed states (https://github.com/ansible/ansible/pull/74511)
- Reduce number of iterations through PlayIterator (https://github.com/ansible/ansible/pull/74175)
- Remove more Python 2.x compatibility code from controller (https://github.com/ansible/ansible/pull/77320).
- Start of moving away from using Six, Python 2 and 3 compatibility library (https://github.com/ansible/ansible/pull/75863)
- The collection loader now reports a Python warning if an attempt is made to install the Ansible collection loader a second time. Previously this condition was reported using an Ansible warning.
- ``ansible-galaxy collection [install|verify]`` - allow user-provided signature sources in addition to those from the Galaxy server. Each collection entry in a requirements file can specify a ``signatures`` key followed by a list of sources. Collection name(s) provided on the CLI can specify additional signature sources by using the ``--signatures`` CLI option. Signature sources should be URIs that can be opened with ``urllib.request.urlopen()``, such as "https://example.com/path/to/detached_signature.asc" or "file:///path/to/detached_signature.asc". The ``--keyring`` option must be specified if signature sources are provided.
- ``ansible-galaxy collection [install|verify]`` - use gpg to verify the authenticity of the signed ``MANIFEST.json`` with ASCII armored detached signatures provided by the Galaxy server. The keyring (which is not managed by ``ansible-galaxy``) must be provided with the ``--keyring`` option to use signature verification. If no ``--keyring`` is specified and the collection to ``install|verify`` has associated detached signatures on the Galaxy server, a warning is provided.
- ``ansible-galaxy collection install`` - Add a global configuration to modify the required number of signatures that must verify the authenticity of the collection. By default, the number of required successful signatures is 1. Set this option to ``all`` to require all signatures verify the collection. To ensure signature verification fails if there are no valid signatures, prepend the value with '+', such as ``+all`` or ``+1``.
- ``ansible-galaxy collection install`` - Add a global ignore list for gpg signature errors. This can be used to ignore certain signatures when the number of required successful signatures is all. When the required number of successful signatures is a positive integer, the only effect this has is to display fewer errors to the user on failure (success is determined by having the minimum number of successful signatures, in which case all errors are disregarded).
- ``ansible-galaxy collection install`` - Add a global toggle to turn off GPG signature verification.
- ``ansible-galaxy collection install`` - Store Galaxy server metadata alongside installed collections for provenance. Signatures obtained from the Galaxy server can be used for offline verification with ``ansible-galaxy collection verify --offline``.
- ansible-console - Provide a way to customize the stdout callback
- ansible-core modules - Remove unused Python shebangs from built-in modules.
- ansible-doc metadata dump - add option ``--no-fail-on-errors`` which allows to not fail the ansible-doc invocation when errors happen during docs parsing or processing. Instead they are reported in the JSON result in an ``error`` key for the affected plugins (https://github.com/ansible/ansible/pull/77035).
- ansible-galaxy - the option to skip certificate verification now also applies when cloning via SCM (git/hg) (https://github.com/ansible/ansible/issues/41077)
- ansible-test - Accept new-style Python modules without a shebang.
- ansible-test - Add ``--version`` support to show the ansible-core version.
- ansible-test - Add support for ``rhel/8.5`` remote instances.
- ansible-test - Add support for remote testing of FreeBSD 12.3.
- ansible-test - Add support for running container tests with ``podman remote`` (https://github.com/ansible/ansible/pull/75753)
- ansible-test - Added the ``fedora35`` test container.
- ansible-test - Change the maximum number of open files in a test container from the default to ``10240``.
- ansible-test - Declare public dependencies of ansible-core and use to limit unguarded imports in plugins.
- ansible-test - Importing ``distutils`` now results in an error.
- ansible-test - Installation of ``cryptography`` is no longer version constrained when ``openssl`` 1.1.0 or later is installed.
- ansible-test - Miscellaneous code cleanup and type hint fixes.
- ansible-test - PowerShell in the ``base`` and ``default`` containers has been upgraded to version 7.1.4.
- ansible-test - Remove RHEL 8.4 remote (``rhel/8.4``) support.
- ansible-test - Remove ``idna`` constraint.
- ansible-test - Remove obsolete ``MAXFD`` display.
- ansible-test - Remove obsolete constraints for Python 2.6.
- ansible-test - Remove support for FreeBSD 12.2 remote provisioning.
- ansible-test - Remove support for macOS 11.1 remote provisioning.
- ansible-test - Remove support for provisioning remote AIX instances.
- ansible-test - Remove the ``centos8`` test container since CentOS 8 will reach end-of-life soon.
- ansible-test - Remove the ``fedora33`` test container since Fedora 33 will reach end-of-life soon.
- ansible-test - Remove unused Python 2.x compatibility code.
- ansible-test - Removed support for Sherlock from the Azure provisioning plugin.
- ansible-test - Removed used ``MarkupSafe`` constraint for Python 3.5 and earlier.
- ansible-test - Requirements for the plugin import test are now frozen.
- ansible-test - Shellcheck in the ``base`` and ``default`` containers has been upgraded to version 0.7.0.
- ansible-test - Stop early with an error if the current working directory contains an invalid collection namespace or name.
- ansible-test - The ``--help`` option is now available when an unsupported cwd is in use.
- ansible-test - The ``--help`` output now shows the same instructions about cwd as would be shown in error messages if the cwd is unsupported.
- ansible-test - The ``pip`` and ``wheel`` packages are removed from all sanity test virtual environments after installation completes to reduce their size. Previously they were only removed from the environments used for the ``import`` sanity test.
- ansible-test - The explanation about cwd usage has been improved to explain more clearly what is required.
- ansible-test - The hash for all managed sanity test virtual environments has changed. Containers that include ``ansible-test sanity --prime-venvs`` will need to be rebuilt to continue using primed virtual environments.
- ansible-test - Update ``base`` container to version 2.1.0.
- ansible-test - Update ``base`` container to version 2.2.0.
- ansible-test - Update ``default`` containers to version 5.2.0.
- ansible-test - Update ``default`` containers to version 5.4.0.
- ansible-test - Update ``default`` containers to version 5.5.0.
- ansible-test - Update ``default`` containers to version 5.6.2.
- ansible-test - Update ``default`` containers to version 5.7.0.
- ansible-test - Update ``default`` containers to version 5.8.0.
- ansible-test - Update ``default`` containers to version 5.9.0.
- ansible-test - Update ``pip`` used to bootstrap remote FreeBSD instances from version 20.3.4 to 21.3.1.
- ansible-test - Update sanity test requirements.
- ansible-test - Update the NIOS test plugin container to version 1.4.0.
- ansible-test - Update the ``alpine`` container to version 3.3.0. This updates the base image from 3.14.2 to 3.15.0, which includes support for installing binary wheels using pip.
- ansible-test - Update the ``base`` and ``default`` containers from Python 3.10.0rc2 to 3.10.0.
- ansible-test - Update the ``base`` and ``default`` containers from a Ubuntu 18.04 to Ubuntu 20.04 base image.
- ansible-test - Update the ``default`` containers to version 5.1.0.
- ansible-test - Update the ``galaxy`` test plugin to get its container from a copy on quay.io.
- ansible-test - Update the ``openshift`` test plugin to get its container from a copy on quay.io.
- ansible-test - Use Python 3.10 as the default Python version for the ``base`` and ``default`` containers.
- ansible-test - add macOS 12.0 as a remote target (https://github.com/ansible/ansible/pull/76328)
- ansible-test - handle JSON decode error gracefully in podman environment.
- ansible-test pslint - Added the `AvoidLongLines <https://github.com/PowerShell/PSScriptAnalyzer/blob/master/docs/Rules/AvoidLongLines.md>`_ rule set to a length of 160.
- ansible-test pslint - Added the `PlaceCloseBrace <https://github.com/PowerShell/PSScriptAnalyzer/blob/master/docs/Rules/PlaceCloseBrace.md>`_ rule set to enforce close braces on a newline.
- ansible-test pslint - Added the `PlaceOpenBrace <https://github.com/PowerShell/PSScriptAnalyzer/blob/master/docs/Rules/PlaceOpenBrace.md>`_ rule set to enforce open braces on the same line and a subsequent newline.
- ansible-test pslint - Added the `UseConsistentIndentation <https://github.com/PowerShell/PSScriptAnalyzer/blob/master/docs/Rules/UseConsistentIndentation.md>`_ rule to enforce indentation is done with 4 spaces.
- ansible-test pslint - Added the `UseConsistentWhitespace <https://github.com/PowerShell/PSScriptAnalyzer/blob/master/docs/Rules/UseConsistentWhitespace.md>`_ rule to enforce whitespace consistency in PowerShell.
- ansible-test pslint - Updated ``PowerShellScriptAnalyzer`` to 1.20.0
- ansible-test sanity validate-modules - the validate-modules sanity test now also checks the documentation of documentable plugin types (https://github.com/ansible/ansible/pull/71734).
- ansible-test validate-modules sanity test - add more schema checks to improve quality of plugin documentation (https://github.com/ansible/ansible/pull/77268).
- ansible-test validate_modules - allow ``choices`` for return values (https://github.com/ansible/ansible/pull/76009).
- apt - Add support for using ">=" in package version number matching.
- apt - Adds APT option ``--allow-change-held-packages`` as module parameter ``allow_change_held_packages`` to allow APT up- or downgrading a package which is on APTs hold list (https://github.com/ansible/ansible/issues/65325)
- auto inventory plugin will now give plugin loading information on verbose output
- callbacks - Add result serialization format options to ``_dump_results`` allowing plugins such as the ``default`` callback to emit ``YAML`` serialized task results in addition to ``JSON``
- dnf - add more specific error message for GPG validation (https://github.com/ansible/ansible/issues/76192)
- env lookup, add default option
- facts - report prefix length for IPv4 addresses in Linux network facts.
- get_parsable_locale now logs result when in debug mode.
- git - display the destination directory path in error msg when local_mods detects local modifications conflict so that users see the exact location
- iptables - add the ``chain_management`` parameter that controls iptables chain creation and deletion
- jinja2_native - keep same behavior on Python 3.10.
- junit callback - Add support for replacing the directory portion of out-of-tree relative task paths with a placeholder.
- k8s - scenario guides for kubernetes migrated to ``kubernetes.core`` collection.
- module_utils.distro - Add missing ``typing`` import from original code.
- package_facts - add pkg_info support for OpenBSD and NetBSD (https://github.com/ansible/ansible/pull/76580)
- services_facts - Add support for openrc (https://github.com/ansible/ansible/pull/76373).
- setting DEFAULT_FACT_PATH is being deprecated in favor of the generic module_defaults keyword
- uri - Avoid reading the response body when not needed
- uri - Eliminate multiple requests to determine the final URL for file naming with ``dest``
- validate-modules - do some basic validation on the ``M(...)``, ``U(...)``, ``L(..., ...)`` and ``R(..., ...)`` documentation markups (https://github.com/ansible/ansible/pull/76262).
- vmware - migrated vmware scenario guides to `community.vmware` repo.
- yum, dnf - add sslverify option to temporarily disable certificate validation for a repository
Breaking Changes / Porting Guide
--------------------------------
- Module Python Dependency - Drop support for Python 2.6 in module execution.
- Templating - it is no longer allowed to perform arithmetic and concatenation operations outside of the jinja template (https://github.com/ansible/ansible/pull/75587)
- The ``finalize`` method is no longer exposed in the globals for use in templating.
Deprecated Features
-------------------
- ansible-core - Remove support for Python 2.6.
- ansible-test - Remove support for Python 2.6.
- ssh connection plugin option scp_if_ssh in favor of ssh_transfer_method.
Removed Features (previously deprecated)
----------------------------------------
- Remove deprecated ``Templar.set_available_variables()`` method (https://github.com/ansible/ansible/issues/75828)
- cli - remove deprecated ability to set verbosity before the sub-command (https://github.com/ansible/ansible/issues/75823)
- copy - remove deprecated ``thirsty`` alias (https://github.com/ansible/ansible/issues/75824)
- psrp - Removed fallback on ``put_file`` with older ``pypsrp`` versions. Users must have at least ``pypsrp>=0.4.0``.
- url_argument_spec - remove deprecated ``thirsty`` alias for ``get_url`` and ``uri`` modules (https://github.com/ansible/ansible/issues/75825, https://github.com/ansible/ansible/issues/75826)
Security Fixes
--------------
- Do not include params in exception when a call to ``set_options`` fails. Additionally, block the exception that is returned from being displayed to stdout. (CVE-2021-3620)
Bugfixes
--------
- Add a YAML representer for ``NativeJinjaText``
- Add a YAML representer for ``NativeJinjaUnsafeText``
- AnsiballZ - Ensure we use the full python package in the module cache filename to avoid a case where ``collections:`` is used to execute a module via short name, where the short name duplicates another module from ``ansible.builtin`` or another collection that was executed previously.
- Ansible.ModuleUtils.LinkUtil - Ignore the ``LIB`` environment variable when loading the ``LinkUtil`` code
- Ansible.ModuleUtils.SID - Use user principal name as is for lookup in the ``Convert-ToSID`` function - https://github.com/ansible/ansible/issues/77316
- Detect package manager for Amazon Linux 2022 (AL2022) as dnf
- Ensure the correct ``environment_class`` is set on ``AnsibleJ2Template``
- Fix ``AttributeError`` when providing password file via ``--connection-password-file`` (https://github.com/ansible/ansible/issues/76530)
- Fix ``end_play`` to end the current play only (https://github.com/ansible/ansible/issues/76672)
- Fix collection filter/test plugin redirects (https://github.com/ansible/ansible/issues/77192).
- Fix executing includes in the always section in the free strategy (https://github.com/ansible/ansible/issues/75642)
- Fix for when templating empty template file resulted in file with string 'None' (https://github.com/ansible/ansible/issues/76610)
- Fix help message for the 'ansible-galaxy collection verify' positional argument. The positional argument must be a collection name (https://github.com/ansible/ansible/issues/76087).
- Fix module logging issue when using custom module on WSL2 (https://github.com/ansible/ansible/issues/76320)
- Fix task debugger to work with ``run_once`` using ``linear`` strategy (https://github.com/ansible/ansible/issues/76049)
- Fix traceback when installing a collection from a git repository and git is not installed (https://github.com/ansible/ansible/issues/77479).
- Interpreter Discovery - Fallback to OS family if the distro is not found in ``INTERPRETER_PYTHON_DISTRO_MAP`` (https://github.com/ansible/ansible/issues/75560)
- Interpreter discovery - Add ``RHEL`` to ``OS_FAMILY_MAP`` for correct family fallback for interpreter discovery (https://github.com/ansible/ansible/issues/77368)
- Make include_role/include_tasks work with any_errors_fatal (https://github.com/ansible/ansible/issues/50897)
- Parser errors from within includes should not be rescueable (https://github.com/ansible/ansible/issues/73657)
- Prevent losing unsafe on results returned from lookups (https://github.com/ansible/ansible/issues/77535)
- Templating - Ensure we catch exceptions when getting ``.filters`` and ``.tests`` attributes on their respective plugins and properly error, instead of aborting which results in no filters being added to the jinja2 environment
- Trigger an undefined error when an undefined variable is detected within a dictionary and/or list (https://github.com/ansible/ansible/pull/75587)
- _run_loop - Add the task name to the warning (https://github.com/ansible/ansible/issues/76011)
- ``Templar.copy_with_new_env`` - set the ``finalize`` method of the new ``Templar`` object for the new environment (https://github.com/ansible/ansible/issues/76379)
- add_host/group_by: fix using changed_when in a loop (https://github.com/ansible/ansible/issues/71627)
- ansible - Exclude Python 2.6 from Python interpreter discovery.
- ansible-config avoid showing _terms and _input when --only-changed.
- ansible-doc - Fix ansible-doc -l ansible.builtin / ansible.legacy not returning anything
- ansible-doc - ignore plugin deprecation warnings (https://github.com/ansible/ansible/issues/75671)
- ansible-galaxy - Add galaxy_collection_skeleton/galaxy_collection_skeleton_ignore configuration options
- ansible-galaxy - Fix using the '--ignore-certs' option when there is no server-specific configuration for the Galaxy server.
- ansible-galaxy - installing/downloading collections with invalid versions in git repositories and directories now gives a formatted error message (https://github.com/ansible/ansible/issues/76425, https://github.com/ansible/ansible/issues/75404).
- ansible-galaxy - when installing a role properly raise an error when inaccessible path is specified multiple times in roles_path (e.g. via environment variable and command line option) (https://github.com/ansible/ansible/issues/76316)
- ansible-galaxy collection build - Ignore any existing ``MANIFEST.json`` and ``FILES.json`` in the root directory when building a collection.
- ansible-galaxy collection verify - display files/directories not included in the FILES.json as modified content.
- ansible-galaxy publish - Fix warning and error detection in import messages to properly display them in Ansible
- ansible-pull handle case where hostname and nodename are empty
- ansible-test - Add default entry for Windows remotes to be used with unknown versions.
- ansible-test - All virtual environments managed by ansible-test are marked as usable after being bootstrapped, to avoid errors caused by use of incomplete environments. Previously this was only done for sanity tests. Existing environments from previous versions of ansible-test will be recreated on demand due to lacking the new marker.
- ansible-test - Automatic target requirements installation is now based on the target environment instead of the controller environment.
- ansible-test - Correctly detect when running as the ``root`` user (UID 0) on the origin host. The result of the detection was incorrectly being inverted.
- ansible-test - Don't fail if network cannot be disconnected (https://github.com/ansible/ansible/pull/77472)
- ansible-test - Fix Python real prefix detection when running in a ``venv`` virtual environment.
- ansible-test - Fix ``windows-integration`` and ``network-integration`` when used with the ``--docker`` option and user-provided inventory.
- ansible-test - Fix installation and usage of ``pyyaml`` requirement for the ``import`` sanity test for collections.
- ansible-test - Fix path to inventory file for ``windows-integration`` and ``network-integration`` commands for collections.
- ansible-test - Fix plugin loading.
- ansible-test - Fix skipping of tests marked ``needs/python`` on the origin host.
- ansible-test - Fix skipping of tests marked ``needs/root`` on the origin host.
- ansible-test - Fix the ``import`` sanity test to work properly when Ansible's built-in vendoring support is in use.
- ansible-test - Fix the ``validate-modules`` sanity test to avoid double-loading the collection loader and possibly failing on import of the ``packaging`` module.
- ansible-test - Fix traceback in ``import`` sanity test on Python 2.7 when ``pip`` is not available.
- ansible-test - Fix traceback in the ``validate-modules`` sanity test when testing an Ansible module without any callables.
- ansible-test - Fix traceback when running from an install and delegating execution to a different Python interpreter.
- ansible-test - Fix traceback when using the ``--all`` option with PowerShell code coverage.
- ansible-test - Fix type hints.
- ansible-test - Import ``yaml.cyaml.CParser`` instead of ``_yaml.CParser`` in the ``yamllint`` sanity test.
- ansible-test - Limit ``paramiko`` installation to versions before 2.9.0. This is required to maintain support for systems which do not support RSA SHA-2 algorithms.
- ansible-test - Pylint Deprecated Plugin - Use correct message symbols when date or version is not a float or str (https://github.com/ansible/ansible/issues/77085)
- ansible-test - Relocate constants to eliminate symlink.
- ansible-test - Replace the directory portion of out-of-tree paths in JUnit files from integration tests with the ``out-of-tree:`` prefix.
- ansible-test - Sanity tests run with the ``--requirements` option for Python 2.x now install ``virtualenv`` when it is missing or too old. Previously it was only installed if missing. Version 16.7.12 is now installed instead of the latest version.
- ansible-test - Set the ``pytest`` option ``--rootdir`` instead of letting it be auto-detected.
- ansible-test - Show an error message instead of a traceback when running outside of a supported directory.
- ansible-test - Target integration test requirements are now correctly installed for target environments running on the controller.
- ansible-test - The ``import`` sanity test no longer reports errors about ``packaging`` being missing when testing collections.
- ansible-test - Update distribution test containers to version 3.1.0.
- ansible-test - Update help links to reference ``ansible-core`` instead of ``ansible``.
- ansible-test - Update unit tests to use the ``--forked`` option instead of the deprecated ``--boxed`` option.
- ansible-test - Use https://ci-files.testing.ansible.com/ for instance bootstrapping instead of an S3 endpoint.
- ansible-test - Use relative paths in JUnit files generated during integration test runs.
- ansible-test - Use the correct variable to reference the client's SSH key when generating inventory.
- ansible-test - Use the legacy collection loader for ``import`` sanity tests on target-only Python versions.
- ansible-test - Virtual environments managed by ansible-test now use consistent versions of ``pip``, ``setuptools`` and ``wheel``. This avoids issues with virtual environments containing outdated or dysfunctional versions of these tools. The initial bootstrapping of ``pip`` is done by ansible-test from an HTTPS endpoint instead of creating the virtual environment with it already present.
- ansible-test - fix a typo in validate-modules.
- ansible-test - fixed support container failures (eg http-test-container) under podman
- ansible-test compile sanity test - do not crash if a column could not be determined for an error (https://github.com/ansible/ansible/pull/77465).
- ansible-test pslint - Fix error when encountering validation results that are highly nested - https://github.com/ansible/ansible/issues/74151
- ansible-vault encrypt_string - fix ``--output`` option to correctly write encrypted string into given file (https://github.com/ansible/ansible/issues/75101)
- ansible.builtin.file modification_time supports check_mode
- ansible_facts.devices - Fix parsing of device serial number detected via sg_inq for rhel8 (https://github.com/ansible/ansible/issues/75420)
- apt - fails to deploy deb file to old debian systems using python-apt < 0.8.9 (https://github.com/ansible/ansible/issues/47277)
- arg_spec - Fix incorrect ``no_log`` warning when a parameter alias is used (https://github.com/ansible/ansible/pull/77576)
- async - Improve performance of sending async callback events by never sending the full task through the queue (https://github.com/ansible/ansible/issues/76729)
- catch the case that cowsay is broken which would lead to missing output
- cleaning facts will now only warn about the variable name and not post the content, which can be undesireable to disclose
- collection_loader - Implement 'find_spec' and 'exec_module' to override deprecated importlib methods 'find_module' and 'load_module' when applicable (https://github.com/ansible/ansible/issues/74660).
- correctly inherit vars from parent in block (https://github.com/ansible/ansible/issues/75286).
- default callback - Ensure we compare FQCN also in lockstep logic, to ensure using the FQCN of a strategy plugin triggers the correct behavior in the default callback plugin. (https://github.com/ansible/ansible/issues/76782)
- distribution - add EuroLinux to fact gathering (https://github.com/ansible/ansible/pull/76624).
- distribution - detect tencentos and gather correct facts on the distro.
- dnf - ensure releasever is passed into libdnf as string (https://github.com/ansible/ansible/issues/77010)
- extend timeout for ansible-galaxy when communicating with the galaxy server api, and apply it to all interactions with the api
- facts - add support for deepin distro information detection (https://github.com/ansible/ansible/issues/77286).
- first_found - fix to allow for spaces in file names (https://github.com/ansible/ansible/issues/77136)
- gather_facts - Fact gathering now continues even if it fails to read a file
- gather_facts action now handles the move of base connection plugin types into collections to add/prevent subset argument correctly
- gather_facts/setup will not fail anymore if capsh is present but not executable
- git module fix docs and proper use of ssh wrapper script and GIT_SSH_COMMAND depending on version.
- git module is more consistent and clearer about which ssh options are added to git calls.
- git module no longer uses wrapper script for ssh options.
- hacking - fix incorrect usage of deprecated fish-shell redirection operators that failed to honor ``--quiet`` flag when sourced (https://github.com/ansible/ansible/pull/77180).
- hostname - Do not require SystemdStrategy subclasses for every distro (https://github.com/ansible/ansible/issues/76792)
- hostname - Fix Debian strategy KeyError, use `SystemdStrategy` (https://github.com/ansible/ansible/issues/76124)
- hostname - Update the systemd strategy in the ``hostname`` module to not interfere with NetworkManager (https://github.com/ansible/ansible/issues/76958)
- hostname - add hostname support for openEuler distro (https://github.com/ansible/ansible/pull/76619).
- hostname - use ``file_get_content()`` to read the file containing the host name in the ``FileStrategy.get_permanent_hostname()`` method. This prevents a ``TypeError`` from being raised when the strategy is used (https://github.com/ansible/ansible/issues/77025).
- include_vars, properly initialize variable as there is corner case in which it can end up referenced and not defined
- inventory - parameterize ``disable_lookups`` in ``Constructable`` (https://github.com/ansible/ansible/issues/76769).
- inventory manager now respects --flush-cache
- junit callback - Fix traceback during automatic fact gathering when using relative paths.
- junit callback - Fix unicode error when handling non-ASCII task paths.
- module_utils.common.yaml - The ``SafeLoader``, ``SafeDumper`` and ``Parser`` classes now fallback to ``object`` when ``yaml`` is not available. This fixes tracebacks when inheriting from these classes without requiring a ``HAS_YAML`` guard around class definitions.
- parameters - handle blank values when argument is a list (https://github.com/ansible/ansible/issues/77108).
- play_context now compensates for when a conneciton sets the default to inventory_hostname but skips adding it to the vars.
- playbook/strategy have more informative 'attribute' based errors for playbook objects and handlers.
- python modules (new type) will now again prefer the specific python stated in the module's shebang instead of hardcoding to /usr/bin/python.
- replace - Always return ``rc`` to ensure return values are consistent - https://github.com/ansible/ansible/pull/71963
- script - skip in check mode if the plugin cannot determine if a change will occur (i.e. neither `creates` or `removes` are provided).
- service - Fixed handling of sleep arguments during service restarts on AIX. (https://github.com/ansible/ansible/issues/76877)
- service - Fixed service restarts with arguments on AIX. (https://github.com/ansible/ansible/issues/76840)
- service_facts module will now give more meaningful warnings when it fails to gather data.
- set_fact/include_vars correctly handle delegation assignments within loops
- setup - detect docker container with check for ./dockerenv or ./dockinit (https://github.com/ansible/ansible/pull/74349).
- shell/command - only return changed as True if the task has not been skipped.
- shell/command - only skip in check mode if the options `creates` and `removes` are both None.
- ssh connection - properly quote controlpersist path given by user to avoid issues with spaces and other characters
- ssh connection avoid parsing ssh cli debug lines as they can match expected output at high verbosities.
- ssh connection now uses more correct host source as play_context can ignore loop/delegation variations.
- sudo become plugin, fix handling of non interactive flags, previous substitution was too naive
- systemd - check if service is alias so it gets enabled (https://github.com/ansible/ansible/issues/75538).
- systemd - check if service is indirect so it gets enabled (https://github.com/ansible/ansible/issues/76453).
- task_executor reverts the change to push facts into delegated vars on loop finalization as result managing code already handles this and was duplicating effort to wrong result.
- template lookup - restore inadvertently deleted default for ``convert_data`` (https://github.com/ansible/ansible/issues/77004)
- to_json/to_nice_json filters defaults back to unvaulting/no unsafe packing.
- unarchive - Fix zip archive file listing that caused issues with content postprocessing (https://github.com/ansible/ansible/issues/76067).
- unarchive - Make extraction work when the LANGUAGE environment variable is set to a non-English locale.
- unarchive - apply ``owner`` and ``group`` permissions to top folder (https://github.com/ansible/ansible/issues/35426)
- unarchive - include the original error when a handler cannot manage the archive (https://github.com/ansible/ansible/issues/28977).
- unarchive - the ``io_buffer_size`` option added in 2.12 was not accepted by the module (https://github.com/ansible/ansible/pull/77271).
- urls - Allow ``ca_path`` to point to a bundle containing multiple PEM certs (https://github.com/ansible/ansible/issues/75015)
- urls/uri - Address case where ``HTTPError`` isn't fully initialized due to the error, and is missing certain methods and attributes (https://github.com/ansible/ansible/issues/76386)
- user - allow ``password_expiry_min`` and ``password_expiry_min`` to be set to ``0`` (https://github.com/ansible/ansible/issues/75017)
- user - allow password min and max to be set at the same time (https://github.com/ansible/ansible/issues/75017)
- user - update logic to check if user exists or not in MacOS.
- validate_argument_spec - Skip suboption validation if the top level option is an invalid type (https://github.com/ansible/ansible/issues/75612).
- variablemanager, more efficient read of vars files
- vault - Warn instead of fail for missing vault IDs if at least one valid vault secret is found.
- winrm - Ensure ``kinit`` is run with the same ``PATH`` env var as the Ansible process
- yum - prevent storing unnecessary cache data by running `yum makecache fast` (https://github.com/ansible/ansible/issues/76336)
Known Issues
------------
- get_url - document ``check_mode`` correctly with unreliable changed status (https://github.com/ansible/ansible/issues/65687).

View File

@ -1,6 +0,0 @@
Placeholder changelog
=====================
This file is a placeholder; a version-specific ``CHANGELOG-vX.Y.rst`` will be generated during releases from fragments
under changelogs/fragments. On release branches once a release has been created, consult the branch's version-specific
file for changes that have occurred in that branch.

View File

@ -1,915 +0,0 @@
ancestor: 2.12.0
releases:
2.13.0:
changes:
release_summary: '| Release Date: 2022-05-16
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
'
codename: Nobody's Fault but Mine
fragments:
- v2.13.0_summary.yaml
release_date: '2022-05-16'
2.13.0b0:
changes:
breaking_changes:
- Module Python Dependency - Drop support for Python 2.6 in module execution.
- Templating - it is no longer allowed to perform arithmetic and concatenation
operations outside of the jinja template (https://github.com/ansible/ansible/pull/75587)
- The ``finalize`` method is no longer exposed in the globals for use in templating.
bugfixes:
- Add a YAML representer for ``NativeJinjaText``
- Add a YAML representer for ``NativeJinjaUnsafeText``
- AnsiballZ - Ensure we use the full python package in the module cache filename
to avoid a case where ``collections:`` is used to execute a module via short
name, where the short name duplicates another module from ``ansible.builtin``
or another collection that was executed previously.
- Ansible.ModuleUtils.LinkUtil - Ignore the ``LIB`` environment variable when
loading the ``LinkUtil`` code
- Ansible.ModuleUtils.SID - Use user principal name as is for lookup in the
``Convert-ToSID`` function - https://github.com/ansible/ansible/issues/77316
- Detect package manager for Amazon Linux 2022 (AL2022) as dnf
- Ensure the correct ``environment_class`` is set on ``AnsibleJ2Template``
- Fix ``AttributeError`` when providing password file via ``--connection-password-file``
(https://github.com/ansible/ansible/issues/76530)
- Fix ``end_play`` to end the current play only (https://github.com/ansible/ansible/issues/76672)
- Fix collection filter/test plugin redirects (https://github.com/ansible/ansible/issues/77192).
- Fix executing includes in the always section in the free strategy (https://github.com/ansible/ansible/issues/75642)
- Fix for when templating empty template file resulted in file with string 'None'
(https://github.com/ansible/ansible/issues/76610)
- Fix help message for the 'ansible-galaxy collection verify' positional argument.
The positional argument must be a collection name (https://github.com/ansible/ansible/issues/76087).
- Fix module logging issue when using custom module on WSL2 (https://github.com/ansible/ansible/issues/76320)
- Fix task debugger to work with ``run_once`` using ``linear`` strategy (https://github.com/ansible/ansible/issues/76049)
- Fix traceback when installing a collection from a git repository and git is
not installed (https://github.com/ansible/ansible/issues/77479).
- Interpreter Discovery - Fallback to OS family if the distro is not found in
``INTERPRETER_PYTHON_DISTRO_MAP`` (https://github.com/ansible/ansible/issues/75560)
- Interpreter discovery - Add ``RHEL`` to ``OS_FAMILY_MAP`` for correct family
fallback for interpreter discovery (https://github.com/ansible/ansible/issues/77368)
- Make include_role/include_tasks work with any_errors_fatal (https://github.com/ansible/ansible/issues/50897)
- Parser errors from within includes should not be rescueable (https://github.com/ansible/ansible/issues/73657)
- Templating - Ensure we catch exceptions when getting ``.filters`` and ``.tests``
attributes on their respective plugins and properly error, instead of aborting
which results in no filters being added to the jinja2 environment
- Trigger an undefined error when an undefined variable is detected within a
dictionary and/or list (https://github.com/ansible/ansible/pull/75587)
- _run_loop - Add the task name to the warning (https://github.com/ansible/ansible/issues/76011)
- '``Templar.copy_with_new_env`` - set the ``finalize`` method of the new ``Templar``
object for the new environment (https://github.com/ansible/ansible/issues/76379)'
- 'add_host/group_by: fix using changed_when in a loop (https://github.com/ansible/ansible/issues/71627)'
- ansible-config avoid showing _terms and _input when --only-changed.
- ansible-doc - Fix ansible-doc -l ansible.builtin / ansible.legacy not returning
anything
- ansible-doc - ignore plugin deprecation warnings (https://github.com/ansible/ansible/issues/75671)
- ansible-galaxy - Add galaxy_collection_skeleton/galaxy_collection_skeleton_ignore
configuration options
- ansible-galaxy - Fix using the '--ignore-certs' option when there is no server-specific
configuration for the Galaxy server.
- ansible-galaxy - installing/downloading collections with invalid versions
in git repositories and directories now gives a formatted error message (https://github.com/ansible/ansible/issues/76425,
https://github.com/ansible/ansible/issues/75404).
- ansible-galaxy - when installing a role properly raise an error when inaccessible
path is specified multiple times in roles_path (e.g. via environment variable
and command line option) (https://github.com/ansible/ansible/issues/76316)
- ansible-galaxy collection build - Ignore any existing ``MANIFEST.json`` and
``FILES.json`` in the root directory when building a collection.
- ansible-galaxy collection verify - display files/directories not included
in the FILES.json as modified content.
- ansible-galaxy publish - Fix warning and error detection in import messages
to properly display them in Ansible
- ansible-pull handle case where hostname and nodename are empty
- ansible-test - Add default entry for Windows remotes to be used with unknown
versions.
- ansible-test - All virtual environments managed by ansible-test are marked
as usable after being bootstrapped, to avoid errors caused by use of incomplete
environments. Previously this was only done for sanity tests. Existing environments
from previous versions of ansible-test will be recreated on demand due to
lacking the new marker.
- ansible-test - Automatic target requirements installation is now based on
the target environment instead of the controller environment.
- ansible-test - Correctly detect when running as the ``root`` user (UID 0)
on the origin host. The result of the detection was incorrectly being inverted.
- ansible-test - Don't fail if network cannot be disconnected (https://github.com/ansible/ansible/pull/77472)
- ansible-test - Fix Python real prefix detection when running in a ``venv``
virtual environment.
- ansible-test - Fix ``windows-integration`` and ``network-integration`` when
used with the ``--docker`` option and user-provided inventory.
- ansible-test - Fix installation and usage of ``pyyaml`` requirement for the
``import`` sanity test for collections.
- ansible-test - Fix path to inventory file for ``windows-integration`` and
``network-integration`` commands for collections.
- ansible-test - Fix plugin loading.
- ansible-test - Fix skipping of tests marked ``needs/python`` on the origin
host.
- ansible-test - Fix skipping of tests marked ``needs/root`` on the origin host.
- ansible-test - Fix the ``import`` sanity test to work properly when Ansible's
built-in vendoring support is in use.
- ansible-test - Fix the ``validate-modules`` sanity test to avoid double-loading
the collection loader and possibly failing on import of the ``packaging``
module.
- ansible-test - Fix traceback in ``import`` sanity test on Python 2.7 when
``pip`` is not available.
- ansible-test - Fix traceback in the ``validate-modules`` sanity test when
testing an Ansible module without any callables.
- ansible-test - Fix traceback when running from an install and delegating execution
to a different Python interpreter.
- ansible-test - Fix traceback when using the ``--all`` option with PowerShell
code coverage.
- ansible-test - Fix type hints.
- ansible-test - Import ``yaml.cyaml.CParser`` instead of ``_yaml.CParser``
in the ``yamllint`` sanity test.
- ansible-test - Limit ``paramiko`` installation to versions before 2.9.0. This
is required to maintain support for systems which do not support RSA SHA-2
algorithms.
- ansible-test - Pylint Deprecated Plugin - Use correct message symbols when
date or version is not a float or str (https://github.com/ansible/ansible/issues/77085)
- ansible-test - Relocate constants to eliminate symlink.
- ansible-test - Replace the directory portion of out-of-tree paths in JUnit
files from integration tests with the ``out-of-tree:`` prefix.
- ansible-test - Sanity tests run with the ``--requirements` option for Python
2.x now install ``virtualenv`` when it is missing or too old. Previously it
was only installed if missing. Version 16.7.12 is now installed instead of
the latest version.
- ansible-test - Set the ``pytest`` option ``--rootdir`` instead of letting
it be auto-detected.
- ansible-test - Show an error message instead of a traceback when running outside
of a supported directory.
- ansible-test - Target integration test requirements are now correctly installed
for target environments running on the controller.
- ansible-test - The ``import`` sanity test no longer reports errors about ``packaging``
being missing when testing collections.
- ansible-test - Update distribution test containers to version 3.1.0.
- ansible-test - Update help links to reference ``ansible-core`` instead of
``ansible``.
- ansible-test - Update unit tests to use the ``--forked`` option instead of
the deprecated ``--boxed`` option.
- ansible-test - Use https://ci-files.testing.ansible.com/ for instance bootstrapping
instead of an S3 endpoint.
- ansible-test - Use relative paths in JUnit files generated during integration
test runs.
- ansible-test - Use the correct variable to reference the client's SSH key
when generating inventory.
- ansible-test - Use the legacy collection loader for ``import`` sanity tests
on target-only Python versions.
- ansible-test - Virtual environments managed by ansible-test now use consistent
versions of ``pip``, ``setuptools`` and ``wheel``. This avoids issues with
virtual environments containing outdated or dysfunctional versions of these
tools. The initial bootstrapping of ``pip`` is done by ansible-test from an
HTTPS endpoint instead of creating the virtual environment with it already
present.
- ansible-test - fix a typo in validate-modules.
- ansible-test - fixed support container failures (eg http-test-container) under
podman
- ansible-test compile sanity test - do not crash if a column could not be determined
for an error (https://github.com/ansible/ansible/pull/77465).
- ansible-test pslint - Fix error when encountering validation results that
are highly nested - https://github.com/ansible/ansible/issues/74151
- ansible-vault encrypt_string - fix ``--output`` option to correctly write
encrypted string into given file (https://github.com/ansible/ansible/issues/75101)
- ansible.builtin.file modification_time supports check_mode
- ansible_facts.devices - Fix parsing of device serial number detected via sg_inq
for rhel8 (https://github.com/ansible/ansible/issues/75420)
- apt - fails to deploy deb file to old debian systems using python-apt < 0.8.9
(https://github.com/ansible/ansible/issues/47277)
- async - Improve performance of sending async callback events by never sending
the full task through the queue (https://github.com/ansible/ansible/issues/76729)
- catch the case that cowsay is broken which would lead to missing output
- cleaning facts will now only warn about the variable name and not post the
content, which can be undesireable to disclose
- collection_loader - Implement 'find_spec' and 'exec_module' to override deprecated
importlib methods 'find_module' and 'load_module' when applicable (https://github.com/ansible/ansible/issues/74660).
- correctly inherit vars from parent in block (https://github.com/ansible/ansible/issues/75286).
- default callback - Ensure we compare FQCN also in lockstep logic, to ensure
using the FQCN of a strategy plugin triggers the correct behavior in the default
callback plugin. (https://github.com/ansible/ansible/issues/76782)
- distribution - add EuroLinux to fact gathering (https://github.com/ansible/ansible/pull/76624).
- distribution - detect tencentos and gather correct facts on the distro.
- dnf - ensure releasever is passed into libdnf as string (https://github.com/ansible/ansible/issues/77010)
- extend timeout for ansible-galaxy when communicating with the galaxy server
api, and apply it to all interactions with the api
- facts - add support for deepin distro information detection (https://github.com/ansible/ansible/issues/77286).
- first_found - fix to allow for spaces in file names (https://github.com/ansible/ansible/issues/77136)
- gather_facts - Fact gathering now continues even if it fails to read a file
- gather_facts action now handles the move of base connection plugin types into
collections to add/prevent subset argument correctly
- gather_facts/setup will not fail anymore if capsh is present but not executable
- git module fix docs and proper use of ssh wrapper script and GIT_SSH_COMMAND
depending on version.
- git module is more consistent and clearer about which ssh options are added
to git calls.
- git module no longer uses wrapper script for ssh options.
- hacking - fix incorrect usage of deprecated fish-shell redirection operators
that failed to honor ``--quiet`` flag when sourced (https://github.com/ansible/ansible/pull/77180).
- hostname - Do not require SystemdStrategy subclasses for every distro (https://github.com/ansible/ansible/issues/76792)
- hostname - Fix Debian strategy KeyError, use `SystemdStrategy` (https://github.com/ansible/ansible/issues/76124)
- hostname - Update the systemd strategy in the ``hostname`` module to not interfere
with NetworkManager (https://github.com/ansible/ansible/issues/76958)
- hostname - add hostname support for openEuler distro (https://github.com/ansible/ansible/pull/76619).
- hostname - use ``file_get_content()`` to read the file containing the host
name in the ``FileStrategy.get_permanent_hostname()`` method. This prevents
a ``TypeError`` from being raised when the strategy is used (https://github.com/ansible/ansible/issues/77025).
- include_vars, properly initialize variable as there is corner case in which
it can end up referenced and not defined
- inventory - parameterize ``disable_lookups`` in ``Constructable`` (https://github.com/ansible/ansible/issues/76769).
- inventory manager now respects --flush-cache
- junit callback - Fix traceback during automatic fact gathering when using
relative paths.
- junit callback - Fix unicode error when handling non-ASCII task paths.
- module_utils.common.yaml - The ``SafeLoader``, ``SafeDumper`` and ``Parser``
classes now fallback to ``object`` when ``yaml`` is not available. This fixes
tracebacks when inheriting from these classes without requiring a ``HAS_YAML``
guard around class definitions.
- parameters - handle blank values when argument is a list (https://github.com/ansible/ansible/issues/77108).
- play_context now compensates for when a conneciton sets the default to inventory_hostname
but skips adding it to the vars.
- playbook/strategy have more informative 'attribute' based errors for playbook
objects and handlers.
- python modules (new type) will now again prefer the specific python stated
in the module's shebang instead of hardcoding to /usr/bin/python.
- replace - Always return ``rc`` to ensure return values are consistent - https://github.com/ansible/ansible/pull/71963
- script - skip in check mode if the plugin cannot determine if a change will
occur (i.e. neither `creates` or `removes` are provided).
- service - Fixed handling of sleep arguments during service restarts on AIX.
(https://github.com/ansible/ansible/issues/76877)
- service - Fixed service restarts with arguments on AIX. (https://github.com/ansible/ansible/issues/76840)
- service_facts module will now give more meaningful warnings when it fails
to gather data.
- set_fact/include_vars correctly handle delegation assignments within loops
- setup - detect docker container with check for ./dockerenv or ./dockinit (https://github.com/ansible/ansible/pull/74349).
- shell/command - only return changed as True if the task has not been skipped.
- shell/command - only skip in check mode if the options `creates` and `removes`
are both None.
- ssh connection - properly quote controlpersist path given by user to avoid
issues with spaces and other characters
- ssh connection avoid parsing ssh cli debug lines as they can match expected
output at high verbosities.
- ssh connection now uses more correct host source as play_context can ignore
loop/delegation variations.
- sudo become plugin, fix handling of non interactive flags, previous substitution
was too naive
- systemd - check if service is alias so it gets enabled (https://github.com/ansible/ansible/issues/75538).
- systemd - check if service is indirect so it gets enabled (https://github.com/ansible/ansible/issues/76453).
- task_executor reverts the change to push facts into delegated vars on loop
finalization as result managing code already handles this and was duplicating
effort to wrong result.
- template lookup - restore inadvertently deleted default for ``convert_data``
(https://github.com/ansible/ansible/issues/77004)
- to_json/to_nice_json filters defaults back to unvaulting/no unsafe packing.
- unarchive - Fix zip archive file listing that caused issues with content postprocessing
(https://github.com/ansible/ansible/issues/76067).
- unarchive - Make extraction work when the LANGUAGE environment variable is
set to a non-English locale.
- unarchive - apply ``owner`` and ``group`` permissions to top folder (https://github.com/ansible/ansible/issues/35426)
- unarchive - include the original error when a handler cannot manage the archive
(https://github.com/ansible/ansible/issues/28977).
- unarchive - the ``io_buffer_size`` option added in 2.12 was not accepted by
the module (https://github.com/ansible/ansible/pull/77271).
- urls - Allow ``ca_path`` to point to a bundle containing multiple PEM certs
(https://github.com/ansible/ansible/issues/75015)
- urls/uri - Address case where ``HTTPError`` isn't fully initialized due to
the error, and is missing certain methods and attributes (https://github.com/ansible/ansible/issues/76386)
- user - allow ``password_expiry_min`` and ``password_expiry_min`` to be set
to ``0`` (https://github.com/ansible/ansible/issues/75017)
- user - allow password min and max to be set at the same time (https://github.com/ansible/ansible/issues/75017)
- user - update logic to check if user exists or not in MacOS.
- validate_argument_spec - Skip suboption validation if the top level option
is an invalid type (https://github.com/ansible/ansible/issues/75612).
- vault - Warn instead of fail for missing vault IDs if at least one valid vault
secret is found.
- winrm - Ensure ``kinit`` is run with the same ``PATH`` env var as the Ansible
process
- yum - prevent storing unnecessary cache data by running `yum makecache fast`
(https://github.com/ansible/ansible/issues/76336)
deprecated_features:
- ansible-core - Remove support for Python 2.6.
- ansible-test - Remove support for Python 2.6.
- ssh connection plugin option scp_if_ssh in favor of ssh_transfer_method.
known_issues:
- get_url - document ``check_mode`` correctly with unreliable changed status
(https://github.com/ansible/ansible/issues/65687).
major_changes:
- Jinja2 Controller Requirement - Jinja2 3.0.0 or newer is required for the
control node (the machine that runs Ansible) (https://github.com/ansible/ansible/pull/75881)
- Templating - remove ``safe_eval`` in favor of using ``NativeEnvironment``
but utilizing ``literal_eval`` only in cases when ``safe_eval`` was used (https://github.com/ansible/ansible/pull/75587)
minor_changes:
- Action Plugins - Add helper method for argument spec validation, and extend
to pause and async_wrapper
- Added AIX root CA certs folders - enhance the TLS support in ``uri`` task
on AIX
- Added ``module_utils.compat.typing`` to facilitate type-hinting on all supported
Python versions.
- Ansible.Basic - small changes to allow use in PowerShell modules running on
non-Windows platforms (https://github.com/ansible/ansible/pull/76924).
- AnsibleModule.run_command() now has a toggle to allow caller to decide to
handle exceptions from executing the command itself
- Attach concat function to an environment class (https://github.com/ansible/ansible/pull/76282)
- Clarify in a comment that unrolling an iterator in ``Templar._finalize`` is
actually necessary. Also switch to using the ``_unroll_iterator`` decorator
directly to deduplicate code in ``Templar._finalize``. (https://github.com/ansible/ansible/pull/76436)
- Installation - modernize our python installation, to reduce dynamic code in
setup.py, and migrate what is feasible to setup.cfg. This will enable shipping
wheels in the future.
- PlayIterator - introduce public methods to access ``PlayIterator._host_states``
(https://github.com/ansible/ansible/pull/74416)
- PlayIterator - use enums for Iterating and Failed states (https://github.com/ansible/ansible/pull/74511)
- Reduce number of iterations through PlayIterator (https://github.com/ansible/ansible/pull/74175)
- Remove more Python 2.x compatibility code from controller (https://github.com/ansible/ansible/pull/77320).
- Start of moving away from using Six, Python 2 and 3 compatibility library
(https://github.com/ansible/ansible/pull/75863)
- The collection loader now reports a Python warning if an attempt is made to
install the Ansible collection loader a second time. Previously this condition
was reported using an Ansible warning.
- '``ansible-galaxy collection [install|verify]`` - allow user-provided signature
sources in addition to those from the Galaxy server. Each collection entry
in a requirements file can specify a ``signatures`` key followed by a list
of sources. Collection name(s) provided on the CLI can specify additional
signature sources by using the ``--signatures`` CLI option. Signature sources
should be URIs that can be opened with ``urllib.request.urlopen()``, such
as "https://example.com/path/to/detached_signature.asc" or "file:///path/to/detached_signature.asc".
The ``--keyring`` option must be specified if signature sources are provided.'
- '``ansible-galaxy collection [install|verify]`` - use gpg to verify the authenticity
of the signed ``MANIFEST.json`` with ASCII armored detached signatures provided
by the Galaxy server. The keyring (which is not managed by ``ansible-galaxy``)
must be provided with the ``--keyring`` option to use signature verification.
If no ``--keyring`` is specified and the collection to ``install|verify``
has associated detached signatures on the Galaxy server, a warning is provided.'
- '``ansible-galaxy collection install`` - Add a global configuration to modify
the required number of signatures that must verify the authenticity of the
collection. By default, the number of required successful signatures is 1.
Set this option to ``all`` to require all signatures verify the collection.
To ensure signature verification fails if there are no valid signatures, prepend
the value with ''+'', such as ``+all`` or ``+1``.'
- '``ansible-galaxy collection install`` - Add a global ignore list for gpg
signature errors. This can be used to ignore certain signatures when the number
of required successful signatures is all. When the required number of successful
signatures is a positive integer, the only effect this has is to display fewer
errors to the user on failure (success is determined by having the minimum
number of successful signatures, in which case all errors are disregarded).'
- '``ansible-galaxy collection install`` - Add a global toggle to turn off GPG
signature verification.'
- '``ansible-galaxy collection install`` - Store Galaxy server metadata alongside
installed collections for provenance. Signatures obtained from the Galaxy
server can be used for offline verification with ``ansible-galaxy collection
verify --offline``.'
- ansible-console - Provide a way to customize the stdout callback
- ansible-core modules - Remove unused Python shebangs from built-in modules.
- ansible-doc metadata dump - add option ``--no-fail-on-errors`` which allows
to not fail the ansible-doc invocation when errors happen during docs parsing
or processing. Instead they are reported in the JSON result in an ``error``
key for the affected plugins (https://github.com/ansible/ansible/pull/77035).
- ansible-galaxy - the option to skip certificate verification now also applies
when cloning via SCM (git/hg) (https://github.com/ansible/ansible/issues/41077)
- ansible-test - Accept new-style Python modules without a shebang.
- ansible-test - Add ``--version`` support to show the ansible-core version.
- ansible-test - Add support for ``rhel/8.5`` remote instances.
- ansible-test - Add support for remote testing of FreeBSD 12.3.
- ansible-test - Add support for running container tests with ``podman remote``
(https://github.com/ansible/ansible/pull/75753)
- ansible-test - Added the ``fedora35`` test container.
- ansible-test - Change the maximum number of open files in a test container
from the default to ``10240``.
- ansible-test - Declare public dependencies of ansible-core and use to limit
unguarded imports in plugins.
- ansible-test - Importing ``distutils`` now results in an error.
- ansible-test - Installation of ``cryptography`` is no longer version constrained
when ``openssl`` 1.1.0 or later is installed.
- ansible-test - Miscellaneous code cleanup and type hint fixes.
- ansible-test - PowerShell in the ``base`` and ``default`` containers has been
upgraded to version 7.1.4.
- ansible-test - Remove RHEL 8.4 remote (``rhel/8.4``) support.
- ansible-test - Remove ``idna`` constraint.
- ansible-test - Remove obsolete ``MAXFD`` display.
- ansible-test - Remove obsolete constraints for Python 2.6.
- ansible-test - Remove support for FreeBSD 12.2 remote provisioning.
- ansible-test - Remove support for macOS 11.1 remote provisioning.
- ansible-test - Remove support for provisioning remote AIX instances.
- ansible-test - Remove the ``centos8`` test container since CentOS 8 will reach
end-of-life soon.
- ansible-test - Remove the ``fedora33`` test container since Fedora 33 will
reach end-of-life soon.
- ansible-test - Remove unused Python 2.x compatibility code.
- ansible-test - Removed support for Sherlock from the Azure provisioning plugin.
- ansible-test - Removed used ``MarkupSafe`` constraint for Python 3.5 and earlier.
- ansible-test - Requirements for the plugin import test are now frozen.
- ansible-test - Shellcheck in the ``base`` and ``default`` containers has been
upgraded to version 0.7.0.
- ansible-test - Stop early with an error if the current working directory contains
an invalid collection namespace or name.
- ansible-test - The ``--help`` option is now available when an unsupported
cwd is in use.
- ansible-test - The ``--help`` output now shows the same instructions about
cwd as would be shown in error messages if the cwd is unsupported.
- ansible-test - The ``pip`` and ``wheel`` packages are removed from all sanity
test virtual environments after installation completes to reduce their size.
Previously they were only removed from the environments used for the ``import``
sanity test.
- ansible-test - The explanation about cwd usage has been improved to explain
more clearly what is required.
- ansible-test - The hash for all managed sanity test virtual environments has
changed. Containers that include ``ansible-test sanity --prime-venvs`` will
need to be rebuilt to continue using primed virtual environments.
- ansible-test - Update ``base`` container to version 2.1.0.
- ansible-test - Update ``base`` container to version 2.2.0.
- ansible-test - Update ``default`` containers to version 5.2.0.
- ansible-test - Update ``default`` containers to version 5.4.0.
- ansible-test - Update ``default`` containers to version 5.5.0.
- ansible-test - Update ``default`` containers to version 5.6.2.
- ansible-test - Update ``default`` containers to version 5.7.0.
- ansible-test - Update ``default`` containers to version 5.8.0.
- ansible-test - Update ``pip`` used to bootstrap remote FreeBSD instances from
version 20.3.4 to 21.3.1.
- ansible-test - Update sanity test requirements.
- ansible-test - Update the NIOS test plugin container to version 1.4.0.
- ansible-test - Update the ``alpine`` container to version 3.3.0. This updates
the base image from 3.14.2 to 3.15.0, which includes support for installing
binary wheels using pip.
- ansible-test - Update the ``base`` and ``default`` containers from Python
3.10.0rc2 to 3.10.0.
- ansible-test - Update the ``base`` and ``default`` containers from a Ubuntu
18.04 to Ubuntu 20.04 base image.
- ansible-test - Update the ``default`` containers to version 5.1.0.
- ansible-test - Update the ``galaxy`` test plugin to get its container from
a copy on quay.io.
- ansible-test - Update the ``openshift`` test plugin to get its container from
a copy on quay.io.
- ansible-test - Use Python 3.10 as the default Python version for the ``base``
and ``default`` containers.
- ansible-test - add macOS 12.0 as a remote target (https://github.com/ansible/ansible/pull/76328)
- ansible-test - handle JSON decode error gracefully in podman environment.
- ansible-test pslint - Added the `AvoidLongLines <https://github.com/PowerShell/PSScriptAnalyzer/blob/master/docs/Rules/AvoidLongLines.md>`_
rule set to a length of 160.
- ansible-test pslint - Added the `PlaceCloseBrace <https://github.com/PowerShell/PSScriptAnalyzer/blob/master/docs/Rules/PlaceCloseBrace.md>`_
rule set to enforce close braces on a newline.
- ansible-test pslint - Added the `PlaceOpenBrace <https://github.com/PowerShell/PSScriptAnalyzer/blob/master/docs/Rules/PlaceOpenBrace.md>`_
rule set to enforce open braces on the same line and a subsequent newline.
- ansible-test pslint - Added the `UseConsistentIndentation <https://github.com/PowerShell/PSScriptAnalyzer/blob/master/docs/Rules/UseConsistentIndentation.md>`_
rule to enforce indentation is done with 4 spaces.
- ansible-test pslint - Added the `UseConsistentWhitespace <https://github.com/PowerShell/PSScriptAnalyzer/blob/master/docs/Rules/UseConsistentWhitespace.md>`_
rule to enforce whitespace consistency in PowerShell.
- ansible-test pslint - Updated ``PowerShellScriptAnalyzer`` to 1.20.0
- ansible-test sanity validate-modules - the validate-modules sanity test now
also checks the documentation of documentable plugin types (https://github.com/ansible/ansible/pull/71734).
- ansible-test validate-modules sanity test - add more schema checks to improve
quality of plugin documentation (https://github.com/ansible/ansible/pull/77268).
- ansible-test validate_modules - allow ``choices`` for return values (https://github.com/ansible/ansible/pull/76009).
- apt - Add support for using ">=" in package version number matching.
- apt - Adds APT option ``--allow-change-held-packages`` as module parameter
``allow_change_held_packages`` to allow APT up- or downgrading a package which
is on APTs hold list (https://github.com/ansible/ansible/issues/65325)
- auto inventory plugin will now give plugin loading information on verbose
output
- callbacks - Add result serialization format options to ``_dump_results`` allowing
plugins such as the ``default`` callback to emit ``YAML`` serialized task
results in addition to ``JSON``
- dnf - add more specific error message for GPG validation (https://github.com/ansible/ansible/issues/76192)
- env lookup, add default option
- facts - report prefix length for IPv4 addresses in Linux network facts.
- get_parsable_locale now logs result when in debug mode.
- git - display the destination directory path in error msg when local_mods
detects local modifications conflict so that users see the exact location
- iptables - add the ``chain_management`` parameter that controls iptables chain
creation and deletion
- jinja2_native - keep same behavior on Python 3.10.
- junit callback - Add support for replacing the directory portion of out-of-tree
relative task paths with a placeholder.
- k8s - scenario guides for kubernetes migrated to ``kubernetes.core`` collection.
- module_utils.distro - Add missing ``typing`` import from original code.
- package_facts - add pkg_info support for OpenBSD and NetBSD (https://github.com/ansible/ansible/pull/76580)
- services_facts - Add support for openrc (https://github.com/ansible/ansible/pull/76373).
- setting DEFAULT_FACT_PATH is being deprecated in favor of the generic module_defaults
keyword
- uri - Avoid reading the response body when not needed
- uri - Eliminate multiple requests to determine the final URL for file naming
with ``dest``
- validate-modules - do some basic validation on the ``M(...)``, ``U(...)``,
``L(..., ...)`` and ``R(..., ...)`` documentation markups (https://github.com/ansible/ansible/pull/76262).
- vmware - migrated vmware scenario guides to `community.vmware` repo.
- yum, dnf - add sslverify option to temporarily disable certificate validation
for a repository
release_summary: '| Release Date: 2022-04-11
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
'
removed_features:
- Remove deprecated ``Templar.set_available_variables()`` method (https://github.com/ansible/ansible/issues/75828)
- cli - remove deprecated ability to set verbosity before the sub-command (https://github.com/ansible/ansible/issues/75823)
- copy - remove deprecated ``thirsty`` alias (https://github.com/ansible/ansible/issues/75824)
- psrp - Removed fallback on ``put_file`` with older ``pypsrp`` versions. Users
must have at least ``pypsrp>=0.4.0``.
- url_argument_spec - remove deprecated ``thirsty`` alias for ``get_url`` and
``uri`` modules (https://github.com/ansible/ansible/issues/75825, https://github.com/ansible/ansible/issues/75826)
security_fixes:
- Do not include params in exception when a call to ``set_options`` fails. Additionally,
block the exception that is returned from being displayed to stdout. (CVE-2021-3620)
codename: Nobody's Fault but Mine
fragments:
- ' 75876-fix-parsing-of-device-serial-number-for-rhel-8.yaml'
- 47277-fails-to-deploy-deb-when-has-no-architecture-attribute.yml
- 50771-uri-improvements.yml
- 50897-include_role-any_errors_fatal.yaml
- 67616-galaxy-scm-cloning-ignore-certs.yml
- 69776-add-aix-root-ca-certs-paths.yml
- 71627-add_host-group_by-fix-changed_when-in-loop.yml
- 71734-validate-plugins.yml
- 72405-git-module-local_mods-show-conflict-destination-directory.yml
- 72592-catch-broken-cowsay.yaml
- 73024-unarchive-apply-permissions-top-folder.yml
- 73629_allow-change-held-packages.yml
- 73657-include-parser-error-fail.yml
- 74127-bad-filter-2.yml
- 74349-improve-docker-detection.yml
- 74416-PlayIterator-_host_states-setters.yml
- 74511-PlayIterator-states-enums.yml
- 75002-apt_min_version.yml
- 75015-ca-path-bundle.yml
- 75017-user-password-expiry.yml
- 75101-ansible-vault-encrypt_string-output-file.yml
- 75538-systemd-alias-check.yml
- 75540-warn-invalid-configured-vault-secret-files.yaml
- 75560-interp-discovery-family-fallback.yml
- 75635-fix-role-argspec-suboption-validation.yml
- 75642-free-strat-fix-executing-includes.yml
- 75671-ansible-doc-ignore-deprecations.yml
- 75823-cli-remove-deprecated-verbosity-before-sub-cmd.yml
- 75824-copy-remove-deprecated-thirsty-alias.yml
- 75825-75826-get_url-uri-remove-deprecated-thirsty-alias.yml
- 75828-remove-deprecated-set_available_variables.yml
- 75845-ansible-galaxy-support-collection-skeleton.yml
- 75863-start-move-away-six.yml
- 75881-jinja2-3-min.yml
- 76009-validate-modules-choices-return-value.yml
- 76011-loop-variable-in-use-warning.yml
- 76049-task-debugger-run_once.yml
- 76069-fix-unarchive-file-listing-in-zip.yaml
- 76108-fix-ansible-galaxy-collection-verify-help.yaml
- 76124-hostname-debianstrategy.yml
- 76192-dnf-specific-gpg-error.yml
- 76225-update-collection-loader-for-python3.yaml
- 76235-fix-ansible-doc-builtin-legacy.yml
- 76262-validate-modules-validate-markup.yml
- 76316-galaxy-install-role-inaccessible-dir-fix.yml
- 76336-yum-makecache-fast.yml
- 76343-tencentos-dnf.yml
- 76353-fix-check-mode-skipping.yaml
- 76356-yumdnf-sslverify.yml
- 76365-unarchive-include-stderr-in-error-message.yml
- 76373-add-openrc-support-to-service_facts.yaml
- 76375-fix-module-logging-WSL2.yml
- 76378-iptables-chain-management.yml
- 76379-set-finalize-on-new-env.yml
- 76386-httperror-no-fp.yml
- 76433-get_url-document-check_mode.yml
- 76453-indirect-systemd-status.yml
- 76530-connection-password-file-tb-fix.yml
- 76542-fix-unarchive-on-nenglish-locales.yml
- 76579-fix-ansible-galaxy-collection-version-error.yml
- 76580-add-pkg_info-support-to-package_facts.yml
- 76610-empty-template-none.yml
- 76672-fix-end_play-multiple_plays.yml
- 76681-ansible-galaxy-add-gpg-signature-verification.yaml
- 76690-fix-ansible-galaxy-collection-verify-modified-content.yaml
- 76729-async-callback-perf.yml
- 76735-ansible-galaxy-fix-ignore-certs.yaml
- 76751-facts-check-datafile-before-close.yml
- 76769-inventory-constructable-disable-lookups.yml
- 76782-fqcn-compare-lockstep-strategies.yml
- 76792-hostname-all-systemd.yml
- 76840-added-restart-to-the-argument-condition-for-AIX.yml
- 76877-added-sleep-to-the-service-restart-for-AIX.yml
- 76924-powershell-ansible.basic-support-non-windows.yml
- 76958-hostname-systemd-nm.yaml
- 77004-restore-missing-default.yml
- 77010-dnf-ensure-releasever-string.yml
- 77035-ansible-doc-metadata-dump-errors.yml
- 77050-add-pkg-mgr-support-for-al2022.yaml
- 77074-hostname-fix-typeerror-in-filestrategy.yml
- 77086-correct-pylint-symbols.yml
- 77108_params_blank.yml
- 77136-first_found-spaces-in-names.yml
- 77180-fix-fish-env-setup-script.yml
- 77193-linux-networking-facts-Provide-IPv4-prefix.yml
- 77210-fix-collection-filter-test-redirects.yml
- 77268-validate-plugins.yml
- 77271-unarchive.yml
- 77275-add-support-for-deepin-distro-info-detection.yaml
- 77320-python-2.yml
- 77368-rhel-os-family-compat.yaml
- 77465-ansible-test-compile-crash.yml
- 77472-ansible-test-network-disconnect-warning.yml
- 77493-ansible-galaxy-find-git-executable-before-using.yaml
- ModuleUtils.SID-long-username.yml
- action-plugin-arg-spec.yml
- ansible-console-callback.yaml
- ansible-core-python-2.6.yaml
- ansible-module-shebangs.yml
- ansible-test-alpine3-update.yaml
- ansible-test-azure-sherlock.yml
- ansible-test-bootstrap-pip.yml
- ansible-test-ci-files.yaml
- ansible-test-code-cleanup.yml
- ansible-test-collection-identifier.yml
- ansible-test-constraints-cleanup.yaml
- ansible-test-constraints.yaml
- ansible-test-container-images.yml
- ansible-test-container-removal.yml
- ansible-test-default-base-containers-base-update.yaml
- ansible-test-default-base-containers-python-3.10.yaml
- ansible-test-default-container-update-5.2.0.yaml
- ansible-test-default-container-update-5.4.0.yaml
- ansible-test-default-container-update-5.5.0.yaml
- ansible-test-default-container-update-5.6.2.yaml
- ansible-test-default-container-update-5.7.0.yaml
- ansible-test-default-container-update-5.8.0.yaml
- ansible-test-default-container-update.yaml
- ansible-test-delegation-inventory.yaml
- ansible-test-delegation-pythonpath.yml
- ansible-test-distro-containers-3.1.0.yaml
- ansible-test-docker-ulimit.yml
- ansible-test-fedora35.yml
- ansible-test-fix-type-hints.yml
- ansible-test-fix-typo-validate-modules.yaml
- ansible-test-freebsd-12.3.yaml
- ansible-test-help-cwd.yml
- ansible-test-import-collections.yml
- ansible-test-import-distutils.yaml
- ansible-test-inventory-path.yaml
- ansible-test-inventory-ssh-key.yml
- ansible-test-junit-relative-paths.yml
- ansible-test-links.yml
- ansible-test-managed-venv.yml
- ansible-test-maxfd.yaml
- ansible-test-nios-container.yml
- ansible-test-paramiko-constraint.yaml
- ansible-test-plugin-loading.yml
- ansible-test-podman-remote.yaml
- ansible-test-podman-support-containers.yaml
- ansible-test-powershell-coverage-all.yaml
- ansible-test-pyopenssl.yaml
- ansible-test-pytest-forked.yml
- ansible-test-pytest-rootdir.yml
- ansible-test-python-2.6.yaml
- ansible-test-relocate-constants.yaml
- ansible-test-remote-cleanup.yaml
- ansible-test-remove-aix-provisioning.yaml
- ansible-test-requirements-target.yaml
- ansible-test-rhel-8.4.yml
- ansible-test-rhel85.yaml
- ansible-test-sanity-import-loader.yml
- ansible-test-sanity-import-no-pip.yml
- ansible-test-sanity-import.yml
- ansible-test-sanity-requirements-update.yaml
- ansible-test-sanity-vendoring.yml
- ansible-test-target-filter.yml
- ansible-test-unsupported-directory-traceback.yaml
- ansible-test-validate-modules-collection-loader.yml
- ansible-test-validate-modules-no-callable.yml
- ansible-test-venv-real-prefix.yaml
- ansible-test-windows-default.yaml
- ansible-test-yaml-import.yaml
- ansible_galaxy_timeout.yml
- ansible_test.yml
- auto_squeal.yml
- avoid-set_options-leak.yaml
- clarify-unroll.yml
- clean_facts_values.yml
- compat-typing.yml
- config_fix_terms.yml
- default-callback-result-format.yml
- deprecate_default_fact_path_setting.yml
- deprecate_scp_if_ssh.yml
- distro-module_utils-typing.yml
- drop-target-2.6-support.yml
- environment-concat.yml
- evn_default.yml
- file_modification_times_support_check_mode.yml
- finalize-not-in-globals.yml
- fix_block_var_inh.yml
- fix_fax_delegation_loops.yml
- fix_sudo_flag_mangling.yml
- fqn-module-cache.yml
- galaxy-build-files-ignore.yml
- galaxy-import-level-fix.yml
- gather_facts_collections.yml
- git_fixes.yml
- handle_connection_cornercase.yml
- include_vars_failed.yml
- inventory_manager_flush_cache.yml
- jinja2_native-literal_eval-py310.yml
- json_filter_fix.yml
- junit-callback-task-path-unicode.yml
- log_locale_selection_results.yml
- macos12-ci-image.yml
- migrated_k8s_scenario_guides.yml
- modernize-install.yaml
- module_utils-yaml-fix.yml
- more_targeted_attribute_errors.yml
- nativejinjatext-yaml-representer.yml
- nativejinjaunsafetext-yaml-representer.yml
- openEuler_hostname.yml
- pslint-sanity-warning.yml
- psrp-put_file-dep.yaml
- pull_fix_limit.yml
- pwsh-pssa-update.yml
- reduce-playiterator-iterations.yml
- replace-rc-return-values.yml
- restore_python_shebang_adherence.yml
- runc_command_exception_toggle.yml
- service_facts_warnings.yml
- set_fact_delegation.yml
- ssh_debug_noparse.yml
- ssh_quote_cp.yml
- ssh_use_right_host.yml
- support_eurolinux.yml
- templar-correct-environment_class-template.yml
- templating-safe-eval-replaced-native_environment.yml
- user_mac.yaml
- v2.13.0-initial-commit.yaml
- v2.13.0b0_summary.yaml
- vmware_sceanrio.yml
- win_LinkUtil-ignore-LIB.yml
- winrm-kinit-path.yml
release_date: '2022-04-11'
2.13.0b1:
changes:
bugfixes:
- ansible - Exclude Python 2.6 from Python interpreter discovery.
- arg_spec - Fix incorrect ``no_log`` warning when a parameter alias is used
(https://github.com/ansible/ansible/pull/77576)
- variablemanager, more efficient read of vars files
minor_changes:
- ansible-test - Update ``default`` containers to version 5.9.0.
release_summary: '| Release Date: 2022-04-25
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
'
codename: Nobody's Fault but Mine
fragments:
- 77576-arg_spec-no_log-aliases.yml
- ansible-test-default-container-update-5.9.0.yaml
- python-2.6-discovery.yml
- v2.13.0b1_summary.yaml
- vm_more_efficient.yml
release_date: '2022-04-25'
2.13.0rc1:
changes:
bugfixes:
- Prevent losing unsafe on results returned from lookups (https://github.com/ansible/ansible/issues/77535)
release_summary: '| Release Date: 2022-05-02
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
'
codename: Nobody's Fault but Mine
fragments:
- 77535-prevent-losing-unsafe-lookups.yml
- v2.13.0rc1_summary.yaml
release_date: '2022-05-02'
2.13.1:
changes:
release_summary: '| Release Date: 2022-06-20
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
'
codename: Nobody's Fault but Mine
fragments:
- v2.13.1_summary.yaml
release_date: '2022-06-20'
2.13.1rc1:
changes:
bugfixes:
- Add PyYAML >= 5.1 as a dependency of ansible-core to be compatible with Python
3.8+.
- ansible-config dump - Only display plugin type headers when plugin options
are changed if --only-changed is specified.
- ansible-galaxy - handle unsupported versions of resolvelib gracefully.
- ansible-test - Fix internal validation of remote completion configuration.
- ansible-test - Prevent ``--target-`` prefixed options for the ``shell`` command
from being combined with legacy environment options.
- ansible-test - Sanity test output with the ``--lint`` option is no longer
mixed in with bootstrapping output.
- ansible-test - Subprocesses are now isolated from the stdin, stdout and stderr
of ansible-test. This avoids issues with subprocesses tampering with the file
descriptors, such as SSH making them non-blocking. As a result of this change,
subprocess output from unit and integration tests on stderr now go to stdout.
- ansible-test - Subprocesses no longer have access to the TTY ansible-test
is connected to, if any. This maintains consistent behavior between local
testing and CI systems, which typically do not provide a TTY. Tests which
require a TTY should use pexpect or another mechanism to create a PTY.
- apt module now correctly handles virtual packages.
- lookup plugin - catch KeyError when lookup returns dictionary (https://github.com/ansible/ansible/pull/77789).
- pip - fix cases where resolution of pip Python module fails when importlib.util
has not already been imported
- plugin loader - Sort results when fuzzy matching plugin names (https://github.com/ansible/ansible/issues/77966).
- plugin loader will now load config data for plugin by name instead of by file
to avoid issues with the same file being loaded under different names (fqcn
+ short name).
- psrp connection now handles default to inventory_hostname correctly.
- winrm connection now handles default to inventory_hostname correctly.
minor_changes:
- "Add an 'action_plugin' field for modules in runtime.yml plugin_routing.\n\nThis
fixes module_defaults by supporting modules-as-redirected-actions\nwithout
redirecting module_defaults entries to the common action.\n\n.. code: yaml\n\n
\ plugin_routing:\n action:\n facts:\n redirect: ns.coll.eos\n
\ command:\n redirect: ns.coll.eos\n modules:\n facts:\n
\ redirect: ns.coll.eos_facts\n command:\n redirect:
ns.coll.eos_command\n\nWith the runtime.yml above for ns.coll, a task such
as\n\n.. code: yaml\n\n - hosts: all\n module_defaults:\n ns.coll.eos_facts:
{'valid_for_eos_facts': 'value'}\n ns.coll.eos_command: {'not_valid_for_eos_facts':
'value'}\n tasks:\n - ns.coll.facts:\n\nwill end up with defaults
for eos_facts and eos_command\nsince both modules redirect to the same action.\n\nTo
select an action plugin for a module without merging\nmodule_defaults, define
an action_plugin field for the resolved\nmodule in the runtime.yml.\n\n..
code: yaml\n\n plugin_routing:\n modules:\n facts:\n redirect:
ns.coll.eos_facts\n action_plugin: ns.coll.eos\n command:\n
\ redirect: ns.coll.eos_command\n action_plugin: ns.coll.eos\n\nThe
action_plugin field can be a redirected action plugin, as\nit is resolved
normally.\n\nUsing the modified runtime.yml, the example task will only use\nthe
ns.coll.eos_facts defaults.\n"
- ansible-galaxy - Support resolvelib versions 0.6.x, 0.7.x, and 0.8.x. The
full range of supported versions is now >= 0.5.3, < 0.9.0.
- ansible-test - Add RHEL 9.0 remote support.
- ansible-test - Add support for Ubuntu VMs using the ``--remote`` option.
- ansible-test - Add support for exporting inventory with ``ansible-test shell
--export {path}``.
- ansible-test - Add support for multi-arch remotes.
- ansible-test - Add support for running non-interactive commands with ``ansible-test
shell``.
- ansible-test - Avoid using the ``mock_use_standalone_module`` setting for
unit tests running on Python 3.8 or later.
- ansible-test - Blocking mode is now enforced for stdin, stdout and stderr.
If any of these are non-blocking then ansible-test will exit during startup
with an error.
- ansible-test - Improve consistency of output messages by using stdout or stderr
for most output, but not both.
- ansible-test - The ``shell`` command can be used outside a collection if no
controller delegation is required.
release_summary: '| Release Date: 2022-06-13
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
'
codename: Nobody's Fault but Mine
fragments:
- 77265-module_defaults-with-modules-as-redirected-actions.yaml
- 77630-ansible-galaxy-fix-unsupported-resolvelib-version.yml
- 77649-support-recent-resolvelib-versions.yml
- 77789-catch-keyerror-lookup-dict.yml
- 77898-ansible-config-dump-only-changed-all-types.yml
- 77936-add-pyyaml-version.yml
- ansible-test-ansible-core-mock.yml
- ansible-test-multi-arch-remotes.yml
- ansible-test-remote-completion-validation.yml
- ansible-test-rhel-9.yaml
- ansible-test-shell-features.yml
- ansible-test-subprocess-isolation.yml
- ansible-test-target-options.yml
- ansible-test-ubuntu-remote.yml
- apt_virtual_fix.yml
- config_load_by_name.yml
- pip-lazy-import.yml
- plugin-loader-deterministic-fuzzy-match.yml
- v2.13.1rc1_summary.yaml
- windows_conn_option_fix.yml
release_date: '2022-06-13'
2.13.2rc1:
changes:
bugfixes:
- Move undefined check from concat to finalize (https://github.com/ansible/ansible/issues/78156)
- ansible-doc - no longer list module and plugin aliases that are created with
symlinks (https://github.com/ansible/ansible/pull/78137).
- ansible-doc - when listing modules in collections, proceed recursively. This
fixes module listing for community.general 5.x.y and community.network 4.x.y
(https://github.com/ansible/ansible/pull/78137).
- ansible-doc will not add 'website for' in ":ref:" substitutions as it made
them confusing.
- file backed cache plugins now handle concurrent access by making atomic updates
to the files.
- password lookup does not ignore k=v arguments anymore.
- user - Fix error "Permission denied" in user module while generating SSH keys
(https://github.com/ansible/ansible/issues/78017).
minor_changes:
- ansible-test - An improved error message is shown when the download of a pip
bootstrap script fails. The download now uses ``urllib2`` instead of ``urllib``
on Python 2.
release_summary: '| Release Date: 2022-07-11
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
'
codename: Nobody's Fault but Mine
fragments:
- 78137-ansible-doc-list-modules-recursively.yml
- 78156-undefined-check-in-finalize.yml
- ansible-test-pip-bootstrap.yml
- atomic_cache_files.yml
- fix_adoc_text.yml
- password_lookup_fix.yml
- permission-denied-spwd-module.yml
- v2.13.2rc1_summary.yaml
release_date: '2022-07-11'

View File

@ -1,22 +0,0 @@
---
title: ansible-core
release_tag_re: '(v(?:[\d.ab\-]|rc)+)'
pre_release_tag_re: '(?P<pre_release>(?:[ab]|rc)+\d*)$'
changes_file: changelog.yaml
changes_format: combined
keep_fragments: true
always_refresh: true
ignore_other_fragment_extensions: true
mention_ancestor: false
notesdir: fragments
prelude_section_name: release_summary
new_plugins_after_name: removed_features
sections:
- ['major_changes', 'Major Changes']
- ['minor_changes', 'Minor Changes']
- ['breaking_changes', 'Breaking Changes / Porting Guide']
- ['deprecated_features', 'Deprecated Features']
- ['removed_features', 'Removed Features (previously deprecated)']
- ['security_fixes', 'Security Fixes']
- ['bugfixes', 'Bugfixes']
- ['known_issues', 'Known Issues']

View File

@ -1,2 +0,0 @@
bugfixes:
- ansible_facts.devices - Fix parsing of device serial number detected via sg_inq for rhel8 (https://github.com/ansible/ansible/issues/75420)

View File

@ -1,2 +0,0 @@
bugfixes:
- apt - fails to deploy deb file to old debian systems using python-apt < 0.8.9 (https://github.com/ansible/ansible/issues/47277)

View File

@ -1,3 +0,0 @@
minor_changes:
- uri - Eliminate multiple requests to determine the final URL for file naming with ``dest``
- uri - Avoid reading the response body when not needed

View File

@ -1,2 +0,0 @@
bugfixes:
- Make include_role/include_tasks work with any_errors_fatal (https://github.com/ansible/ansible/issues/50897)

View File

@ -1,2 +0,0 @@
minor_changes:
- ansible-galaxy - the option to skip certificate verification now also applies when cloning via SCM (git/hg) (https://github.com/ansible/ansible/issues/41077)

View File

@ -1,3 +0,0 @@
---
minor_changes:
- Added AIX root CA certs folders - enhance the TLS support in ``uri`` task on AIX

View File

@ -1,2 +0,0 @@
bugfixes:
- "add_host/group_by: fix using changed_when in a loop (https://github.com/ansible/ansible/issues/71627)"

View File

@ -1,2 +0,0 @@
minor_changes:
- "ansible-test sanity validate-modules - the validate-modules sanity test now also checks the documentation of documentable plugin types (https://github.com/ansible/ansible/pull/71734)."

View File

@ -1,2 +0,0 @@
minor_changes:
- git - display the destination directory path in error msg when local_mods detects local modifications conflict so that users see the exact location

View File

@ -1,2 +0,0 @@
bugfixes:
- catch the case that cowsay is broken which would lead to missing output

View File

@ -1,2 +0,0 @@
bugfixes:
- unarchive - apply ``owner`` and ``group`` permissions to top folder (https://github.com/ansible/ansible/issues/35426)

View File

@ -1,3 +0,0 @@
minor_changes:
- apt - Adds APT option ``--allow-change-held-packages`` as module parameter ``allow_change_held_packages`` to allow APT up- or
downgrading a package which is on APTs hold list (https://github.com/ansible/ansible/issues/65325)

View File

@ -1,2 +0,0 @@
bugfixes:
- Parser errors from within includes should not be rescueable (https://github.com/ansible/ansible/issues/73657)

View File

@ -1,5 +0,0 @@
bugfixes:
- Templating - Ensure we catch exceptions when getting ``.filters`` and
``.tests`` attributes on their respective plugins and properly error,
instead of aborting which results in no filters being added to the
jinja2 environment

View File

@ -1,2 +0,0 @@
bugfixes:
- setup - detect docker container with check for ./dockerenv or ./dockinit (https://github.com/ansible/ansible/pull/74349).

View File

@ -1,2 +0,0 @@
minor_changes:
- "PlayIterator - introduce public methods to access ``PlayIterator._host_states`` (https://github.com/ansible/ansible/pull/74416)"

View File

@ -1,2 +0,0 @@
minor_changes:
- "PlayIterator - use enums for Iterating and Failed states (https://github.com/ansible/ansible/pull/74511)"

View File

@ -1,2 +0,0 @@
minor_changes:
- apt - Add support for using ">=" in package version number matching.

View File

@ -1,3 +0,0 @@
bugfixes:
- urls - Allow ``ca_path`` to point to a bundle containing multiple PEM certs
(https://github.com/ansible/ansible/issues/75015)

View File

@ -1,3 +0,0 @@
bugfixes:
- user - allow ``password_expiry_min`` and ``password_expiry_min`` to be set to ``0`` (https://github.com/ansible/ansible/issues/75017)
- user - allow password min and max to be set at the same time (https://github.com/ansible/ansible/issues/75017)

View File

@ -1,2 +0,0 @@
bugfixes:
- "ansible-vault encrypt_string - fix ``--output`` option to correctly write encrypted string into given file (https://github.com/ansible/ansible/issues/75101)"

View File

@ -1,2 +0,0 @@
bugfixes:
- systemd - check if service is alias so it gets enabled (https://github.com/ansible/ansible/issues/75538).

View File

@ -1,2 +0,0 @@
bugfixes:
- vault - Warn instead of fail for missing vault IDs if at least one valid vault secret is found.

View File

@ -1,4 +0,0 @@
bugfixes:
- Interpreter Discovery - Fallback to OS family if the distro is not found in
``INTERPRETER_PYTHON_DISTRO_MAP``
(https://github.com/ansible/ansible/issues/75560)

View File

@ -1,2 +0,0 @@
bugfixes:
- validate_argument_spec - Skip suboption validation if the top level option is an invalid type (https://github.com/ansible/ansible/issues/75612).

View File

@ -1,2 +0,0 @@
bugfixes:
- Fix executing includes in the always section in the free strategy (https://github.com/ansible/ansible/issues/75642)

View File

@ -1,2 +0,0 @@
bugfixes:
- ansible-doc - ignore plugin deprecation warnings (https://github.com/ansible/ansible/issues/75671)

View File

@ -1,2 +0,0 @@
removed_features:
- cli - remove deprecated ability to set verbosity before the sub-command (https://github.com/ansible/ansible/issues/75823)

View File

@ -1,2 +0,0 @@
removed_features:
- copy - remove deprecated ``thirsty`` alias (https://github.com/ansible/ansible/issues/75824)

View File

@ -1,2 +0,0 @@
removed_features:
- url_argument_spec - remove deprecated ``thirsty`` alias for ``get_url`` and ``uri`` modules (https://github.com/ansible/ansible/issues/75825, https://github.com/ansible/ansible/issues/75826)

View File

@ -1,2 +0,0 @@
removed_features:
- Remove deprecated ``Templar.set_available_variables()`` method (https://github.com/ansible/ansible/issues/75828)

View File

@ -1,2 +0,0 @@
bugfixes:
- ansible-galaxy - Add galaxy_collection_skeleton/galaxy_collection_skeleton_ignore configuration options

View File

@ -1,2 +0,0 @@
minor_changes:
- "Start of moving away from using Six, Python 2 and 3 compatibility library (https://github.com/ansible/ansible/pull/75863)"

View File

@ -1,3 +0,0 @@
major_changes:
- Jinja2 Controller Requirement - Jinja2 3.0.0 or newer is required for the control node (the machine that runs Ansible)
(https://github.com/ansible/ansible/pull/75881)

View File

@ -1,2 +0,0 @@
minor_changes:
- "ansible-test validate_modules - allow ``choices`` for return values (https://github.com/ansible/ansible/pull/76009)."

View File

@ -1,3 +0,0 @@
bugfixes:
- _run_loop - Add the task name to the warning
(https://github.com/ansible/ansible/issues/76011)

View File

@ -1,2 +0,0 @@
bugfixes:
- "Fix task debugger to work with ``run_once`` using ``linear`` strategy (https://github.com/ansible/ansible/issues/76049)"

View File

@ -1,3 +0,0 @@
bugfixes:
- unarchive - Fix zip archive file listing that caused issues with content
postprocessing (https://github.com/ansible/ansible/issues/76067).

View File

@ -1,3 +0,0 @@
bugfixes:
- Fix help message for the 'ansible-galaxy collection verify' positional argument.
The positional argument must be a collection name (https://github.com/ansible/ansible/issues/76087).

View File

@ -1,3 +0,0 @@
bugfixes:
- hostname - Fix Debian strategy KeyError, use `SystemdStrategy`
(https://github.com/ansible/ansible/issues/76124)

View File

@ -1,2 +0,0 @@
minor_changes:
- dnf - add more specific error message for GPG validation (https://github.com/ansible/ansible/issues/76192)

View File

@ -1,4 +0,0 @@
bugfixes:
- >-
collection_loader - Implement 'find_spec' and 'exec_module' to override deprecated importlib methods
'find_module' and 'load_module' when applicable (https://github.com/ansible/ansible/issues/74660).

View File

@ -1,2 +0,0 @@
bugfixes:
- ansible-doc - Fix ansible-doc -l ansible.builtin / ansible.legacy not returning anything

View File

@ -1,2 +0,0 @@
minor_changes:
- "validate-modules - do some basic validation on the ``M(...)``, ``U(...)``, ``L(..., ...)`` and ``R(..., ...)`` documentation markups (https://github.com/ansible/ansible/pull/76262)."

View File

@ -1,2 +0,0 @@
bugfixes:
- "ansible-galaxy - when installing a role properly raise an error when inaccessible path is specified multiple times in roles_path (e.g. via environment variable and command line option) (https://github.com/ansible/ansible/issues/76316)"

Some files were not shown because too many files have changed in this diff Show More