Compare commits

...

42 Commits

Author SHA1 Message Date
86bdec3661 New release v2.14.0rc1 (#79127)
Signed-off-by: Ricardo Carrillo Cruz <ricarril@redhat.com>
2022-10-17 17:04:05 +02:00
febf071d01 [stable-2.14] Don't assume column index for netmask and broadcast (#79121) (#79132)
* Don't assume column index for netmask and broadcast. Fixes #79117

* fix typo
(cherry picked from commit f53dbf9)

Co-authored-by: Matt Martz <matt@sivel.net>
2022-10-13 16:09:01 -05:00
9c9a33904a fix password lookup's use of f=v settings (#76551) (#79106)
* fix password lookup's  use of f=v settings (#76551)

update tests

(cherry picked from commit 5d253a1380)

* fix password unit tests (#79113)

(cherry picked from commit c4d6629bce)

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2022-10-13 14:47:07 -05:00
9bbdfb2c70 community_steering_committee: add a new member (#79089) (#79116)
(cherry picked from commit ad1eba9876)
2022-10-13 10:22:25 -05:00
2ac9e2761b ansible-config, only subvalues should use yaml shorthand (#79073) (#79078)
(cherry picked from commit 27ab589ee8)
2022-10-13 09:42:28 -05:00
172982e83f Add Ansible community 6.5.0 porting guide (#79123)
Co-authored-by: Ansible Service Account <chadams@redhat.com>
2022-10-12 16:16:54 -04:00
c6511e3a5b [stable-2.14] ansible-test - Update pylint to 2.15.4.
(cherry picked from commit 14e7f05318)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-10-11 11:15:40 -07:00
33ed9656c2 Update Ansible release version to v2.14.0b3.post0. (#79100) 2022-10-11 11:21:00 -04:00
d412bb245c New release v2.14.0b3 (#79076) 2022-10-10 10:51:34 -04:00
45f9af1fd4 Backport hacktoberfest 3 (#79069)
* Docs: true/false with boolean values in docsite/rst/playbook_guide (#78958)

(cherry picked from commit 173ddde126)

* No latin terms (#79009)

Fixes #79006

(cherry picked from commit f0cc70f9e1)

* docs: replace latin terms with english in network (#79013)

fixes #78999 by removing Latin usage in network docs

(cherry picked from commit 8d665a1a8e)

* Docs: Typo in Alibaba Cloud Compute Services Guide (#78984)

(cherry picked from commit ea04d05a1e)

* Docs: Replace Latin in the porting guides  (#79011)

(cherry picked from commit 8f4133b514)

Co-authored-by: Suven-p <pandeysuven@gmail.com>
Co-authored-by: Ishan Siddiqui <77967215+ishan-siddiqui@users.noreply.github.com>
Co-authored-by: Samuel Gaist <samuel.gaist@idiap.ch>
Co-authored-by: taso <74918216+tasoint@users.noreply.github.com>
Co-authored-by: smeet07 <81572407+smeet07@users.noreply.github.com>
2022-10-07 11:04:20 -07:00
c0901fcba5 Fixed Latin words, replaced all via with either through or by (#79004) (#79068)
(cherry picked from commit 4f4ad453c4)

Co-authored-by: Ishan Siddiqui <77967215+ishan-siddiqui@users.noreply.github.com>
2022-10-06 17:00:18 -05:00
b5d8c954b8 Backport hacktoberfest 4 (#79070)
* docs: replace latin terms with english in the reference_appendices (#79010)

(cherry picked from commit 4d3c12ae9e)

* docs: replace latin terms with english in the scenario_guides (#79008)

(cherry picked from commit 367cdae3b2)

* Docs: true/false with boolean values (#78980)

* Adding FQCN community.postgresql. to postgresql modules

(cherry picked from commit 56285b1d2b)

* Docs: Add code-block wrappers to code examples (#79037)

* Docs: Add code-block wrappers to code examples

(cherry picked from commit 63b5fc4b8d)

* Docs: Provide descriptive labels for http references (#78959)

(cherry picked from commit f7c01bc866)

* Docs: Adding code blocks wrapper (#79042)

* Adding code blocks wrapper

(cherry picked from commit 3a788314a2)

* Cleaned up test_strategies doc (#79045)

Authored-by: Shade Alabsa <shadealabsa@microsoft.com>
(cherry picked from commit 3fc3371463)

* Docs: fixed configs docs to properly display code blocks (#79040)

* fixed some docs to properly display code blocks
Co-authored-by: Shade Alabsa <shadealabsa@microsoft.com>

(cherry picked from commit 25a770de37)

* Docs: Add code-block wrappers in faq.rst (#79047)

(cherry picked from commit 35700f57cc)

* Docs: Add code-block wrappers in lookup.rst & strategy.rst (#79032, #79033) (#79048)

(cherry picked from commit 680bf029b1)

* Add code-block wrappers in network_debug_troubleshooting.rst

(cherry picked from commit 57f22529cb)

Co-authored-by: Samuel Gaist <samuel.gaist@idiap.ch>
Co-authored-by: prayatharth <73949575+prayatharth@users.noreply.github.com>
Co-authored-by: Mudit Choudhary <74391865+muditchoudhary@users.noreply.github.com>
Co-authored-by: Blaster4385 <53873108+Blaster4385@users.noreply.github.com>
Co-authored-by: Deepshri M <92997066+Deepshaded@users.noreply.github.com>
Co-authored-by: shade34321 <shade34321@users.noreply.github.com>
Co-authored-by: Shellylo <54233305+Shellylo@users.noreply.github.com>
Co-authored-by: Shubhadeep Das <dshubhadeep@gmail.com>
2022-10-06 17:00:05 -05:00
9d7989fbe8 Backport hacktoberfest 2 (#79067)
* Docs: Replace Latin terms in the dev_guide #78997 (#79005)

(cherry picked from commit fbd98cd824)

* replace with boolean true/false (#78950)

(cherry picked from commit 78c9fb4159)

* docs: replace latin terms with english in the os_guide directory (#79007)

Fixes #79003

(cherry picked from commit 55925958ea)

Co-authored-by: Mazen Ramadan <mazenramadan00@gmail.com>
Co-authored-by: Niranjan Meghwal <56632168+NiranjanMeghwal@users.noreply.github.com>
Co-authored-by: Samuel Gaist <samuel.gaist@idiap.ch>
2022-10-06 16:59:46 -05:00
7077ea7f95 Backport hactoberfest 1 (#79065)
* apt_key, fix example indentation

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit cee9872605)

* Docs: Add code-block wrappers to code examples: testing_documentation.rst (#78966)

* Docs: Add code-block wrappers to code examples: testing_documentation.rst
List of changed files:
- docs/docsite/rst/dev_guide/testing_documentation.rst
* Fix: match whitespace convention of other occurences

(cherry picked from commit 538b99781f)

* added code-blocks according to #78962 (#78972)

(cherry picked from commit 01484cdc68)

* Adding code-block wrappers to code examples (#78968)

(cherry picked from commit 1db75a41bf)

* added code-blocks according to #78963 (#78969)

* added code-blocks according to  #78963
* Update testing.rst, added newlines

(cherry picked from commit 446406a0c8)

* Docs: Add code-block wrappers to code examples in style_guide (#78970)

* Docs: Add code-block wrappers to code examples in style_guide
List of changed files:
- docs/docsite/rst/dev-guide/style_guide/index.rst
- docs/docsite/rst/dev-guide/style_guide/basic_rules.rst

(cherry picked from commit 3dc0c2135e)

* #78971 Update module_lifecycle.rst (#78974)

* Update module_lifecycle.rst

(cherry picked from commit 93c2cb2b8e)

* #78965 Adding the code-block to prevent the translation (#78979)

* Adding the code-block to prevent the translation

(cherry picked from commit 9afb37eda6)

* Adds code-block in collection documentation (#78977)

* fix issue #78976

(cherry picked from commit 1b922b42dd)

* docs - Use code-block to format examples in Windows module development walkthrough (#78985)

(cherry picked from commit 56c48d1c45)

* Docs: true/false with boolean values in docsite/rst/os_guide (#78957)

(cherry picked from commit fb8c2daf46)

* Update porting_guide_2.0.rst (#78951)

Replaced http link with rst version - issue https://github.com/ansible/ansible/issues/78914

(cherry picked from commit dc2d15fca4)

* Update porting_guide_3.rst (#78952)

Fixes #78914

(cherry picked from commit 919c449256)

* Update porting_guide_4.rst (#78953)

(cherry picked from commit ba32642538)

* Update porting_guide_5.rst (#78954)

(cherry picked from commit 5137cb16e9)

* scenario guide doc changes (#78934)

(cherry picked from commit 5b333c9665)

Co-authored-by: Jasper <44026484+jasperjonker@users.noreply.github.com>
Co-authored-by: Ozan Uslan <54141068+ozanuslan@users.noreply.github.com>
Co-authored-by: Lukas Grimm <ombre@ombre.ch>
Co-authored-by: Deepshri M <92997066+Deepshaded@users.noreply.github.com>
Co-authored-by: IMvision12 <88665786+IMvision12@users.noreply.github.com>
Co-authored-by: Luigi Giugliano <luigi3000@gmail.com>
Co-authored-by: Thomas Doczkal <thomas@doczkal.eu>
Co-authored-by: jmakhack <joshmak@berkeley.edu>
Co-authored-by: Sudipto Ghosh <sudipto@ghosh.pro>
Co-authored-by: Kampftoast <creeper00001@googlemail.com>
Co-authored-by: J-F-Far <joel.f.farthing@gmail.com>
2022-10-06 16:59:30 -05:00
cd9ef334d0 [stable-2.14] Ensure that we do not squash keywords in validate (#79049) (#79062)
* [stable-2.14] Ensure that we do not squash keywords in validate (#79049)

* Ensure that we do not squash keywords in validate. Fixes #79021

* become_user: nobody should only apply to the test tasks, not the setup_test_user role

* Update how become_user is specified

* Add test to ensure keyword inheritance is working for become

* Add clog frag

* Cache fattributes to prevent re-calculation

* ci_complete

* Remove unnecessary getattr.
(cherry picked from commit 420564c5bc)

Co-authored-by: Matt Martz <matt@sivel.net>

* Remove unneeded merge conflict changes
2022-10-06 09:32:40 -05:00
cd52ae459d Fix using FQCN for flush_handlers (#79057) (#79061)
Fixes #79023

(cherry picked from commit e1daaae42a)
2022-10-06 09:23:49 -05:00
b5eba64882 Omit full fix (#79024)
* omit keyword should reset to context (#78917)

* omit keyword should reset to context

  ensure we use context/inheritance when calculating value,
  using default only when context is unavailable.

  fixes #75692

(cherry picked from commit 9650ddb11c)

* fixes to FA inheritance (#78990)

finalized applies to all field attributes
fix getting parent value
also remove unused/needed extend/prepend signature
moar testing

(cherry picked from commit ff6e4da36a)

* setup role needs it's own info
2022-10-06 08:53:36 -05:00
332ba231cd [stable-2.14] Use python re to parse service output instead of grep (#79015) (#79050)
* Use python re to parse service output instead of grep. Fixes #78541

* Add clog frag

* Add an extra guard to abort if rc is 4, and /etc/init.d is missing
(cherry picked from commit 4458128)

Co-authored-by: Matt Martz <matt@sivel.net>
2022-10-06 08:46:51 -05:00
fea62e7553 Do not crash templating when filter/test name is not a valid Ansible plugin name (#78913) (#79026)
* Do not crash templating when filter/test name is not a valid Ansible plugin name.
* Store and re-raise KeyError if there was one.

Co-authored-by: s-hertel <19572925+s-hertel@users.noreply.github.com>
(cherry picked from commit 6d0aeac1e1)
2022-10-06 08:46:42 -05:00
288dab3214 Update Ansible release version to v2.14.0b2.post0. (#78996) 2022-10-03 15:20:08 -05:00
e88427ae6b New release v2.14.0b2 (#78944) 2022-10-03 13:40:10 -04:00
f46bbb2140 [stable-2.14] ansible-test - Update distro containers to 4.8.0.
The updated containers include coverage 6.5.0..
(cherry picked from commit 5b239acb77)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-09-30 11:03:12 -07:00
53bac70257 [stable-2.14] ansible-test - Update coverage to version 6.5.0. (#78945)
(cherry picked from commit 20c1252212)
2022-09-30 09:56:28 -07:00
d15815c88d Fix connection/become task loop settings (#78565) (#78935)
* Fix connection/become task loop settings

* Remove old code

(cherry picked from commit ba6da65a0f)
2022-09-29 17:04:36 -07:00
04fe7b374d ansible-test validate-module - support sidecar docs (#78904) (#78933)
(cherry picked from commit be4807b712)
2022-09-29 17:03:25 -07:00
923f952d6b Upgrade antsibull-docs to 1.6.1 (#78872) (#78929)
* Bump antsibull-docs version to 1.6.0 to fully support filter docs.

* known_good_reqs.txt no longer exists.

* Bump version to 1.6.1.

(cherry picked from commit d93883645c)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-29 17:02:27 -07:00
5dff3bf46f Backportapalooza 09 29 (#78928)
* iss#72389: Adds note and polishes docs/docsite/rst/tips_tricks/sample_setup.rst (#78858)

Co-authored-by: Jaroslav Klech <jklech@redhat.com>
(cherry picked from commit 964e2bc6fe)

* Fixes typo in rst format (#78884)

.. hint:: requires a blank line above and below.

(cherry picked from commit 71adb02142)

* Update yum.py (#78829)

##### SUMMARY
The entire yum command should be highlighted, not only its options.

##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr

(cherry picked from commit f8f76c5886)

* Add Ansible community 7.x porting guide (#78916)

(cherry picked from commit 0884a7cf0e)

* Fixed spelling (#78911)

(cherry picked from commit ae66d9a1f4)

* Add message about viewing chat history when on IRC (#78834)

(cherry picked from commit 0343ae46d2)

Co-authored-by: JaroslavKlech <klechh@gmail.com>
Co-authored-by: Anwesha Das <anwesha@das.community>
Co-authored-by: Olivier Clavel <olivier.clavel@gmail.com>
Co-authored-by: Christian Adams <chadams@redhat.com>
Co-authored-by: Joel McGuire <jlmcguire4@gmail.com>
Co-authored-by: Greg "Gwmngilfen" Sutcliffe <github@emeraldreverie.org>
2022-09-29 17:01:59 -07:00
7209c0b3d4 apt_repository, handle both new/old gpgp stds (#78735) (#78909)
* apt_repository, handle both new/old gpgp stds

(cherry picked from commit c7cde2645d)
2022-09-29 17:01:05 -07:00
6b8432850f apt module, prevent tb from invalid type for pkg (#78666) (#78907)
* apt module, prevent tb from invalid type for pkg

 see #78663

(cherry picked from commit 7acd4f75c0)
2022-09-28 09:13:00 -05:00
0747c5c859 [stable 2.14] Fix known host changed status when removing non-existing key #78598 (#78881)
* Fix known_hosts changed status when removing non-existing key (#78748)

* Ensure no change is reported when removing missing key for host with other keys

Co-authored-by: Matt Martz <matt@sivel.net>

* Rename changelog fragment for fix known hosts changed status cherry pick

* Rename changelog according to new PR number

Co-authored-by: Matt Martz <matt@sivel.net>
2022-09-28 08:16:08 -05:00
df01924168 [2.14] Improve filter docs (#78883)
(cherry picked from commit 9aa9b4eac0)
2022-09-28 08:15:53 -05:00
e5fd4ae747 plugin loader fix existing config testing (#78859) (#78891)
create specific function to find config entry to avoid repopulating constantly

(cherry picked from commit 4115ddd135)
2022-09-28 08:15:43 -05:00
30b7bfc1d8 documented windows filters (#78876) (#78892)
* documented windows filters

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Sandra McCann <samccann@redhat.com>
(cherry picked from commit 7c4d5f5099)
2022-09-28 08:15:29 -05:00
47712d8d48 Update Ansible release version to v2.14.0b1.post0. (#78875) 2022-09-26 10:27:57 -04:00
c02a270ef1 New release v2.14.0b1 (#78870)
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
2022-09-26 09:30:06 -04:00
4655fe6d8b [stable-2.14] ansible-test - Fix integration test target filter. (#78862)
- Allow disabled, unsupported, unstable and destructive integration test targets to be selected using their respective prefixes.
- Allow unstable tests to run when targeted changes are made and the ``--allow-unstable-changed`` option is specified (resolves https://github.com/ansible/ansible/issues/74213).
(cherry picked from commit d3d7785472)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-09-22 13:38:14 -07:00
7aff371ba5 ansible-test - Fix default container version. (#78854) 2022-09-22 00:20:53 -07:00
38f706a2a3 ansible-test - Update base and default containers. (#78847) 2022-09-21 15:49:43 -07:00
eb35cf9bb7 [stable-2.14] Don't request repo updates when only testing modes (#78843) (#78848)
(cherry picked from commit 2542048)

Co-authored-by: Matt Martz <matt@sivel.net>
2022-09-21 15:24:37 -07:00
900010571d [stable-2.14] Add use_rsa_sha2_algorithms option for paramiko (#78789) (#78842)
Fixes #76737
Fixes #77673

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit 76b7466)

Co-authored-by: Matt Martz <matt@sivel.net>
2022-09-21 12:50:13 -05:00
85dba943ab [stable-2.14] ansible-test - Update Python 3.11 support. (#78840) (#78841)
- Update sanity test requirements to fully support Python 3.11.
- Make Python 3.11 the default in the base and default test containers.

(cherry picked from commit 4d25233ece)
2022-09-21 10:42:14 -07:00
c71fdadadb [stable-2.14] Add ssh_args and friends back, add var for proxy_command (#78826) (#78836)
* [stable-2.14] Add ssh_args and friends back, add var for proxy_command (#78826)

Fixes #78750
(cherry picked from commit 1b47def)

Co-authored-by: Matt Martz <matt@sivel.net>

* Remove non-backportable changes
2022-09-21 11:35:31 -05:00
271 changed files with 4667 additions and 1219 deletions

View File

@ -0,0 +1,431 @@
=================================================
ansible-core 2.14 "C'mon Everybody" Release Notes
=================================================
.. contents:: Topics
v2.14.0rc1
==========
Release Summary
---------------
| Release Date: 2022-10-17
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
Bugfixes
--------
- BSD network facts - Do not assume column indexes, look for ``netmask`` and ``broadcast`` for determining the correct columns when parsing ``inet`` line (https://github.com/ansible/ansible/issues/79117)
- ansible-config limit shorthand format to assigned values
- ansible-test - Update the ``pylint`` sanity test to use version 2.15.4.
v2.14.0b3
=========
Release Summary
---------------
| Release Date: 2022-10-10
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
Bugfixes
--------
- Do not crash when templating an expression with a test or filter that is not a valid Ansible filter name (https://github.com/ansible/ansible/issues/78912, https://github.com/ansible/ansible/pull/78913).
- handlers - fix an issue where the ``flush_handlers`` meta task could not be used with FQCN: ``ansible.builtin.meta`` (https://github.com/ansible/ansible/issues/79023)
- keyword inheritance - Ensure that we do not squash keywords in validate (https://github.com/ansible/ansible/issues/79021)
- omit on keywords was resetting to default value, ignoring inheritance.
- service_facts - Use python re to parse service output instead of grep (https://github.com/ansible/ansible/issues/78541)
New Plugins
-----------
Test
~~~~
- uri - is the string a valid URI
- url - is the string a valid URL
- urn - is the string a valid URN
v2.14.0b2
=========
Release Summary
---------------
| Release Date: 2022-10-03
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
Minor Changes
-------------
- ansible-test validate-modules - Added support for validating module documentation stored in a sidecar file alongside the module (``{module}.yml`` or ``{module}.yaml``). Previously these files were ignored and documentation had to be placed in ``{module}.py``.
- apt_repository will use the trust repo directories in order of preference (more appropriate to less) as they exist on the target.
Breaking Changes / Porting Guide
--------------------------------
- ansible-test validate-modules - Removed the ``missing-python-doc`` error code in validate modules, ``missing-documentation`` is used instead for missing PowerShell module documentation.
Bugfixes
--------
- Fix reusing a connection in a task loop that uses a redirected or aliased name - https://github.com/ansible/ansible/issues/78425
- Fix setting become activation in a task loop - https://github.com/ansible/ansible/issues/78425
- apt module should not traceback on invalid type given as package. issue 78663.
- known_hosts - do not return changed status when a non-existing key is removed (https://github.com/ansible/ansible/issues/78598)
- plugin loader, fix detection for existing configuration before initializing for a plugin
v2.14.0b1
=========
Release Summary
---------------
| Release Date: 2022-09-26
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
Major Changes
-------------
- Move handler processing into new ``PlayIterator`` phase to use the configured strategy (https://github.com/ansible/ansible/issues/65067)
- ansible - At startup the filesystem encoding and locale are checked to verify they are UTF-8. If not, the process exits with an error reporting the errant encoding.
- ansible - Increase minimum Python requirement to Python 3.9 for CLI utilities and controller code
- ansible-test - At startup the filesystem encoding is checked to verify it is UTF-8. If not, the process exits with an error reporting the errant encoding.
- ansible-test - At startup the locale is configured as ``en_US.UTF-8``, with a fallback to ``C.UTF-8``. If neither encoding is available the process exits with an error. If the fallback is used, a warning is displayed. In previous versions the ``en_US.UTF-8`` locale was always requested. However, no startup checking was performed to verify the locale was successfully configured.
Minor Changes
-------------
- Add a new "INVENTORY_UNPARSED_WARNING" flag add to hide the "No inventory was parsed, only implicit localhost is available" warning
- 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.
- Add support for parsing ``-a`` module options as JSON and not just key=value arguments - https://github.com/ansible/ansible/issues/78112
- Added Kylin Linux Advanced Server OS in RedHat OS Family.
- Allow ``when`` conditionals to be used on ``flush_handlers`` (https://github.com/ansible/ansible/issues/77616)
- Allow meta tasks to be used as handlers.
- Display - The display class will now proxy calls to Display.display via the queue from forks/workers to be handled by the parent process for actual display. This reduces some reliance on the fork start method and improves reliability of displaying messages.
- Jinja version test - Add pep440 version_type for version test. (https://github.com/ansible/ansible/issues/78288)
- Loops - Add new ``loop_control.extended_allitems`` to allow users to disable tracking all loop items for each loop (https://github.com/ansible/ansible/issues/75216)
- NetBSD - Add uptime_seconds fact
- Provide a `utc` option for strftime to show time in UTC rather than local time
- Raise a proper error when ``include_role`` or ``import_role`` is used as a handler.
- Remove the ``AnsibleContext.resolve`` method as its override is not necessary. Furthermore the ability to override the ``resolve`` method was deprecated in Jinja 3.0.0 and removed in Jinja 3.1.0.
- Utilize @classmethod and @property together to form classproperty (Python 3.9) to access field attributes of a class
- ``LoopControl`` is now templated through standard ``post_validate`` method (https://github.com/ansible/ansible/pull/75715)
- ``ansible-galaxy collection install`` - add an ``--offline`` option to prevent querying distribution servers (https://github.com/ansible/ansible/issues/77443).
- ansible - Add support for Python 3.11 to Python interpreter discovery.
- ansible - At startup the stdin/stdout/stderr file handles are checked to verify they are using blocking IO. If not, the process exits with an error reporting which file handle(s) are using non-blocking IO.
- ansible-config adds JSON and YAML output formats for list and dump actions.
- ansible-connection now supports verbosity directly on cli
- ansible-console added 'collections' command to match playbook keyword.
- ansible-doc - remove some of the manual formatting, and use YAML more uniformly. This in particular means that ``true`` and ``false`` are used for boolean values, instead of ``True`` and ``False`` (https://github.com/ansible/ansible/pull/78668).
- 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-galaxy now supports a user defined timeout, instead of existing hardcoded 60s (now the default).
- ansible-test - Add FreeBSD 13.1 remote support.
- ansible-test - Add RHEL 9.0 remote support.
- ansible-test - Add support for Python 3.11.
- ansible-test - Add support for RHEL 8.6 remotes.
- 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 provisioning Alpine 3.16 remote instances.
- ansible-test - Add support for provisioning Fedora 36 remote instances.
- ansible-test - Add support for provisioning Ubuntu 20.04 remote instances.
- ansible-test - Add support for provisioning remotes which require ``doas`` for become.
- ansible-test - Add support for running non-interactive commands with ``ansible-test shell``.
- ansible-test - Alpine remotes now use ``sudo`` for tests, using ``doas`` only for bootstrapping.
- 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.
- ansible-test - Avoid using the ``mock_use_standalone_module`` setting for unit tests running on Python 3.8 or later.
- ansible-test - Become support for remote instance provisioning is no longer tied to a fixed list of platforms.
- 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 - Distribution specific test containers are now multi-arch, supporting both x86_64 and aarch64.
- ansible-test - Distribution specific test containers no longer contain a ``/etc/ansible/hosts`` file.
- ansible-test - Enable loading of ``coverage`` data files created by older supported ansible-test releases.
- ansible-test - Fedora 36 has been added as a test container.
- ansible-test - FreeBSD remotes now use ``sudo`` for tests, using ``su`` only for bootstrapping.
- ansible-test - Improve consistency of output messages by using stdout or stderr for most output, but not both.
- ansible-test - Remote Alpine instances now have the ``acl`` package installed.
- ansible-test - Remote Fedora instances now have the ``acl`` package installed.
- ansible-test - Remote FreeBSD instances now have ACLs enabled on the root filesystem.
- ansible-test - Remote Ubuntu instances now have the ``acl`` package installed.
- ansible-test - Remove Fedora 34 test container.
- ansible-test - Remove Fedora 35 test container.
- ansible-test - Remove FreeBSD 13.0 remote support.
- ansible-test - Remove RHEL 8.5 remote support.
- ansible-test - Remove Ubuntu 18.04 test container.
- ansible-test - Remove support for Python 2.7 on provisioned FreeBSD instances.
- ansible-test - Remove support for Python 3.8 on the controller.
- ansible-test - Remove the ``opensuse15py2`` container.
- ansible-test - Support multiple pinned versions of the ``coverage`` module. The version used now depends on the Python version in use.
- ansible-test - Test containers have been updated to remove the ``VOLUME`` instruction.
- ansible-test - The Alpine 3 test container has been updated to Alpine 3.16.0.
- ansible-test - The ``http-test-container`` container is now multi-arch, supporting both x86_64 and aarch64.
- ansible-test - The ``pypi-test-container`` container is now multi-arch, supporting both x86_64 and aarch64.
- ansible-test - The ``shell`` command can be used outside a collection if no controller delegation is required.
- ansible-test - The openSUSE test container has been updated to openSUSE Leap 15.4.
- ansible-test - Ubuntu 22.04 has been added as a test container.
- ansible-test - Update pinned sanity test requirements for all tests.
- ansible-test - Update the ``base`` container to 3.4.0.
- ansible-test - Update the ``default`` containers to 6.6.0.
- apt_repository remove dependency on apt-key and use gpg + /usr/share/keyrings directly instead
- blockinfile - The presence of the multiline flag (?m) in the regular expression for insertafter opr insertbefore controls whether the match is done line by line or with multiple lines (https://github.com/ansible/ansible/pull/75090).
- calls to listify_lookup_plugin_terms in core do not pass in loader/dataloader anymore.
- collections - ``ansible-galaxy collection build`` can now utilize ``MANIFEST.in`` style directives from ``galaxy.yml`` instead of ``build_ignore`` effectively inverting the logic from include by default, to exclude by default. (https://github.com/ansible/ansible/pull/78422)
- config manager, move templating into main query function in config instead of constants
- config manager, remove updates to configdata as it is mostly unused
- configuration entry INTERPRETER_PYTHON_DISTRO_MAP is now 'private' and won't show up in normal configuration queries and docs, since it is not 'settable' this avoids user confusion.
- distribution - add distribution_minor_version for Debian Distro (https://github.com/ansible/ansible/issues/74481).
- documentation construction now gives more information on error.
- facts - add OSMC to Debian os_family mapping
- get_url - permit to pass to parameter ``checksum`` an URL pointing to a file containing only a checksum (https://github.com/ansible/ansible/issues/54390).
- new tests url, uri and urn will verify string as such, but they don't check existance of the resource
- plugin loader - add ansible_name and ansible_aliases attributes to plugin objects/classes.
- systemd is now systemd_service to better reflect the scope of the module, systemd is kept as an alias for backwards compatibility.
- templating - removed internal template cache
- uri - cleanup write_file method, remove overkill safety checks and report any exception, change shutilcopyfile to use module.atomic_move
- urls - Add support to specify SSL/TLS ciphers to use during a request (https://github.com/ansible/ansible/issues/78633)
- validate-modules - Allow ``type: raw`` on a module return type definition for values that have a dynamic type
- version output now includes the path to the python executable that Ansible is running under
- yum_repository - do not give the ``async`` parameter a default value anymore, since this option is deprecated in RHEL 8. This means that ``async = 1`` won't be added to repository files if omitted, but it can still be set explicitly if needed.
Breaking Changes / Porting Guide
--------------------------------
- Allow for lazy evaluation of Jinja2 expressions (https://github.com/ansible/ansible/issues/56017)
- The default ansible-galaxy role skeletons no longer contain .travis.yml files. You can configure ansible-galaxy to use a custom role skeleton that contains a .travis.yml file to continue using Galaxy's integration with Travis CI.
- ansible - At startup the filesystem encoding and locale are checked to verify they are UTF-8. If not, the process exits with an error reporting the errant encoding.
- ansible - Increase minimum Python requirement to Python 3.9 for CLI utilities and controller code
- ansible-test - At startup the filesystem encoding is checked to verify it is UTF-8. If not, the process exits with an error reporting the errant encoding.
- ansible-test - At startup the locale is configured as ``en_US.UTF-8``, with a fallback to ``C.UTF-8``. If neither encoding is available the process exits with an error. If the fallback is used, a warning is displayed. In previous versions the ``en_US.UTF-8`` locale was always requested. However, no startup checking was performed to verify the locale was successfully configured.
- strategy plugins - Make ``ignore_unreachable`` to increase ``ignored`` and ``ok`` and counter, not ``skipped`` and ``unreachable``. (https://github.com/ansible/ansible/issues/77690)
Deprecated Features
-------------------
- Deprecate ability of lookup plugins to return arbitrary data. Lookup plugins must return lists, failing to do so will be an error in 2.18. (https://github.com/ansible/ansible/issues/77788)
- Encryption - Deprecate use of the Python crypt module due to it's impending removal from Python 3.13
- PlayContext.verbosity is deprecated and will be removed in 2.18. Use ansible.utils.display.Display().verbosity as the single source of truth.
- ``DEFAULT_FACT_PATH``, ``DEFAULT_GATHER_SUBSET`` and ``DEFAULT_GATHER_TIMEOUT`` are deprecated and will be removed in 2.18. Use ``module_defaults`` keyword instead.
- ``PlayIterator`` - deprecate ``cache_block_tasks`` and ``get_original_task`` which are noop and unused.
- ``Templar`` - deprecate ``shared_loader_obj`` option which is unused. ``ansible.plugins.loader`` is used directly instead.
- listify_lookup_plugin_terms, deprecate 'loader/dataloader' parameter as it not used.
- vars plugins - determining whether or not to run ansible.legacy vars plugins with the class attribute REQUIRES_WHITELIST is deprecated, set REQUIRES_ENABLED instead.
Removed Features (previously deprecated)
----------------------------------------
- PlayIterator - remove deprecated ``PlayIterator.ITERATING_*`` and ``PlayIterator.FAILED_*``
- Remove deprecated ``ALLOW_WORLD_READABLE_TMPFILES`` configuration option (https://github.com/ansible/ansible/issues/77393)
- Remove deprecated ``COMMAND_WARNINGS`` configuration option (https://github.com/ansible/ansible/issues/77394)
- Remove deprecated ``DISPLAY_SKIPPED_HOSTS`` environment variable (https://github.com/ansible/ansible/issues/77396)
- Remove deprecated ``LIBVIRT_LXC_NOSECLABEL`` environment variable (https://github.com/ansible/ansible/issues/77395)
- Remove deprecated ``NETWORK_GROUP_MODULES`` environment variable (https://github.com/ansible/ansible/issues/77397)
- Remove deprecated ``UnsafeProxy``
- Remove deprecated ``plugin_filters_cfg`` config option from ``default`` section (https://github.com/ansible/ansible/issues/77398)
- Remove deprecated functionality that allows loading cache plugins directly without using ``cache_loader``.
- Remove deprecated functionality that allows subclassing ``DefaultCallback`` without the corresponding ``doc_fragment``.
- Remove deprecated powershell functions ``Load-CommandUtils`` and ``Import-PrivilegeUtil``
- apt_key - remove deprecated ``key`` module param
- command/shell - remove deprecated ``warn`` module param
- get_url - remove deprecated ``sha256sum`` module param
- import_playbook - remove deprecated functionality that allows providing additional parameters in free form
Bugfixes
--------
- "meta: refresh_inventory" does not clobber entries added by add_host/group_by anymore.
- Add PyYAML >= 5.1 as a dependency of ansible-core to be compatible with Python 3.8+.
- Avoid 'unreachable' error when chmod on AIX has 255 as return code.
- Bug fix for when handlers were ran on failed hosts after an ``always`` section was executed (https://github.com/ansible/ansible/issues/52561)
- Do not allow handlers from dynamic includes to be notified (https://github.com/ansible/ansible/pull/78399)
- Ensure handlers observe ``any_errors_fatal`` (https://github.com/ansible/ansible/issues/46447)
- Ensure syntax check errors include playbook filenames
- Ensure the correct ``environment_class`` is set on ``AnsibleJ2Template``
- Error for collection redirects that do not use fully qualified collection names, as the redirect would be determined by the ``collections`` keyword.
- Fix PluginLoader to mimic Python import machinery by adding module to sys.modules before exec
- Fix ``-vv`` output for meta tasks to not have an empty message when skipped, print the skip reason instead. (https://github.com/ansible/ansible/issues/77315)
- Fix an issue where ``ansible_play_hosts`` and ``ansible_play_batch`` were not properly updated when a failure occured in an explicit block inside the rescue section (https://github.com/ansible/ansible/issues/78612)
- Fix dnf module documentation to indicate that comparison operators for package version require spaces around them (https://github.com/ansible/ansible/issues/78295)
- Fix for linear strategy when tasks were executed in incorrect order or even removed from execution. (https://github.com/ansible/ansible/issues/64611, https://github.com/ansible/ansible/issues/64999, https://github.com/ansible/ansible/issues/72725, https://github.com/ansible/ansible/issues/72781)
- Fix for network_cli not getting all relevant connection options
- Fix handlers execution with ``serial`` in the ``linear`` strategy (https://github.com/ansible/ansible/issues/54991)
- Fix potential, but unlikely, cases of variable use before definition.
- Fix traceback when installing a collection from a git repository and git is not installed (https://github.com/ansible/ansible/issues/77479).
- GALAXY_IGNORE_CERTS reworked to allow each server entry to override
- More gracefully handle separator errors in jinja2 template overrides (https://github.com/ansible/ansible/pull/77495).
- Move undefined check from concat to finalize (https://github.com/ansible/ansible/issues/78156)
- Prevent losing unsafe on results returned from lookups (https://github.com/ansible/ansible/issues/77535)
- Propagate ``ansible_failed_task`` and ``ansible_failed_result`` to an outer rescue (https://github.com/ansible/ansible/issues/43191)
- Properly execute rescue section when an include task fails in all loop iterations (https://github.com/ansible/ansible/issues/23161)
- Properly send a skipped message when a list in a ``loop`` is empty and comes from a template (https://github.com/ansible/ansible/issues/77934)
- Support colons in jinja2 template override values (https://github.com/ansible/ansible/pull/77495).
- ``ansible-galaxy`` - remove extra server api call during dependency resolution for requirements and dependencies that are already satisfied (https://github.com/ansible/ansible/issues/77443).
- `ansible-config init -f vars` will now use shorthand format
- action plugins now pass cannonical info to modules instead of 'temporary' info from play_context
- ansible - Exclude Python 2.6 from Python interpreter discovery.
- ansible-config dump - Only display plugin type headers when plugin options are changed if --only-changed is specified.
- ansible-configi init should now skip internal reserved config entries
- ansible-connection - decrypt vaulted parameters before sending over the socket, as vault secrets are not available on the other side.
- ansible-console - Renamed the first argument of ``ConsoleCLI.default`` from ``arg`` to ``line`` to match the first argument of the same method on the base class ``Cmd``.
- ansible-console commands now all have a help entry.
- ansible-console fixed to load modules via fqcn, short names and handle redirects.
- ansible-console now shows installed collection modules.
- ansible-doc - fix listing plugins.
- ansible-doc will not add 'website for' in ":ref:" substitutions as it made them confusing.
- ansible-doc will not again warn and skip when missing docs, always show the doc file (for edit on github) and match legacy plugins.
- ansible-doc will not traceback when legacy plugins don't have docs nor adjacent file with docs
- ansible-doc will now also display until as an 'implicit' templating keyword.
- ansible-doc will now not display version_added_collection under same conditions it does not display version_added.
- ansible-galaxy - Fix detection of ``--role-file`` in arguments for implicit role invocation (https://github.com/ansible/ansible/issues/78204)
- ansible-galaxy - Fix exit codes for role search and delete (https://github.com/ansible/ansible/issues/78516)
- ansible-galaxy - Fix loading boolean server options so False doesn't become a truthy string (https://github.com/ansible/ansible/issues/77416).
- ansible-galaxy - Fix reinitializing the whole collection directory with ``ansible-galaxy collection init ns.coll --force``. Now directories and files that are not included in the collection skeleton will be removed.
- ansible-galaxy - Fix unhandled traceback if a role's dependencies in meta/main.yml or meta/requirements.yml are not lists.
- ansible-galaxy - do not require mandatory keys in the ``galaxy.yml`` of source collections when listing them (https://github.com/ansible/ansible/issues/70180).
- ansible-galaxy - fix installing collections that have dependencies in the metadata set to null instead of an empty dictionary (https://github.com/ansible/ansible/issues/77560).
- ansible-galaxy - fix listing collections that contains metadata but the namespace or name are not strings.
- ansible-galaxy - fix missing meta/runtime.yml in default galaxy skeleton used for ansible-galaxy collection init
- ansible-galaxy - fix setting the cache for paginated responses from Galaxy NG/AH (https://github.com/ansible/ansible/issues/77911).
- ansible-galaxy - handle unsupported versions of resolvelib gracefully.
- ansible-galaxy --ignore-certs now has proper precedence over configuration
- ansible-test - Allow disabled, unsupported, unstable and destructive integration test targets to be selected using their respective prefixes.
- ansible-test - Allow unstable tests to run when targeted changes are made and the ``--allow-unstable-changed`` option is specified (resolves https://github.com/ansible/ansible/issues/74213).
- ansible-test - Always remove containers after failing to create/run them. This avoids leaving behind created containers when using podman.
- 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 - Delegation for commands which generate output for programmatic consumption no longer redirect all output to stdout. The affected commands and options are ``shell``, ``sanity --lint``, ``sanity --list-tests``, ``integration --list-targets``, ``coverage analyze``
- ansible-test - Delegation now properly handles arguments given after ``--`` on the command line.
- ansible-test - Don't fail if network cannot be disconnected (https://github.com/ansible/ansible/pull/77472)
- ansible-test - Fix bootstrapping of Python 3.9 on Ubuntu 20.04 remotes.
- ansible-test - Fix change detection for ansible-test's own integration tests.
- ansible-test - Fix internal validation of remote completion configuration.
- 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 - 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.
- ansible-test - Temporary executables are now verified as executable after creation. Without this check, path injected scripts may not be found, typically on systems with ``/tmp`` mounted using the "noexec" option. This can manifest as a missing Python interpreter, or use of the wrong Python interpreter, as well as other error conditions.
- ansible-test - Test configuration for collections is now parsed only once, prior to delegation. Fixes issue: https://github.com/ansible/ansible/issues/78334
- ansible-test - Test containers are now run with the ``--tmpfs`` option for ``/tmp``, ``/run`` and ``/run/lock``. This allows use of containers built without the ``VOLUME`` instruction. Additionally, containers with those volumes defined no longer create anonymous volumes for them. This avoids leaving behind volumes on the container host after the container is stopped and deleted.
- ansible-test - The ``shell`` command no longer redirects all output to stdout when running a provided command. Any command output written to stderr will be mixed with the stderr output from ansible-test.
- ansible-test - The ``shell`` command no longer requests a TTY when using delegation unless an interactive shell is being used. An interactive shell is the default behavior when no command is given to pass to the shell.
- ansible-test - ansible-doc sanity test - Correctly determine the fully-qualified collection name for plugins in subdirectories, resolving https://github.com/ansible/ansible/issues/78490.
- ansible-test - validate-modules - Documentation-only modules, used for documenting actions, are now allowed to have docstrings (https://github.com/ansible/ansible/issues/77972).
- 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).
- apt - Fix module failure when a package is not installed and only_upgrade=True. Skip that package and check the remaining requested packages for upgrades. (https://github.com/ansible/ansible/issues/78762)
- apt - don't actually update the cache in check mode with update_cache=true.
- apt - don't mark existing packages as manually installed in check mode (https://github.com/ansible/ansible/issues/66413).
- apt - fix package selection to include /etc/apt/preferences(.d) (https://github.com/ansible/ansible/issues/77969)
- apt module now correctly handles virtual packages.
- arg_spec - Fix incorrect ``no_log`` warning when a parameter alias is used (https://github.com/ansible/ansible/pull/77576)
- callback plugins - do not crash when ``exception`` passed from a module is not a string (https://github.com/ansible/ansible/issues/75726, https://github.com/ansible/ansible/pull/77781).
- cli now emits clearer error on no hosts selected
- config, ensure that pulling values from configmanager are templated if possible.
- display itself should be single source of 'verbosity' level to the engine.
- dnf - Condense a few internal boolean returns.
- dnf - The ``nobest`` option now also works for ``state=latest``.
- dnf - The ``skip_broken`` option is now used in installs (https://github.com/ansible/ansible/issues/73072).
- dnf - fix output parsing on systems with ``LANGUAGE`` set to a language other than English (https://github.com/ansible/ansible/issues/78193)
- facts - fix IP address discovery for specific interface names (https://github.com/ansible/ansible/issues/77792).
- facts - fix processor facts on AIX: correctly detect number of cores and threads, turn ``processor`` into a list (https://github.com/ansible/ansible/pull/78223).
- fetch_file - Ensure we only use the filename when calculating a tempfile, and do not incude the query string (https://github.com/ansible/ansible/issues/29680)
- fetch_file - properly split files with multiple file extensions (https://github.com/ansible/ansible/pull/75257)
- file - setting attributes of symbolic links or files that are hard linked no longer fails when the link target is unspecified (https://github.com/ansible/ansible/issues/76142).
- file backed cache plugins now handle concurrent access by making atomic updates to the files.
- git module fix docs and proper use of ssh wrapper script and GIT_SSH_COMMAND depending on version.
- if a config setting prevents running ansible it should at least show it's "origin".
- include module - add docs url to include deprecation message (https://github.com/ansible/ansible/issues/76684).
- items2dict - Handle error if an item is not a dictionary or is missing the required keys (https://github.com/ansible/ansible/issues/70337).
- local facts - if a local fact in the facts directory cannot be stated, store an error message as the fact value and emit a warning just as if just as if the facts execution has failed. The stat can fail e.g. on dangling symlinks.
- lookup plugin - catch KeyError when lookup returns dictionary (https://github.com/ansible/ansible/pull/77789).
- module_utils - Make distro.id() report newer versions of OpenSuSE (at least >=15) also report as ``opensuse``. They report themselves as ``opensuse-leap``.
- module_utils.service - daemonize - Avoid modifying the list of file descriptors while iterating over it.
- null_representation config entry changed to 'raw' as it must allow 'none/null' and empty string.
- paramiko - Add a new option to allow paramiko >= 2.9 to easily work with all devices now that rsa-sha2 support was added to paramiko, which prevented communication with numerous platforms. (https://github.com/ansible/ansible/issues/76737)
- paramiko - Add back support for ``ssh_args``, ``ssh_common_args``, and ``ssh_extra_args`` for parsing the ``ProxyCommand`` (https://github.com/ansible/ansible/issues/78750)
- password lookup does not ignore k=v arguments anymore.
- pause module will now report proper 'echo' vs always being true.
- 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).
- plugin loader, now when skipping a plugin due to an abstract method error we provide that in 'verbose' mode instead of totally obscuring the error. The current implementation assumed only the base classes would trigger this and failed to consider 'in development' plugins.
- prevent lusermod from using group name instead of group id (https://github.com/ansible/ansible/pull/77914)
- prevent type annotation shim failures from causing runtime failures (https://github.com/ansible/ansible/pull/77860)
- psrp connection now handles default to inventory_hostname correctly.
- roles, fixed issue with roles loading paths not contained in the role itself when using the `_from` options.
- setup - Adds a default value to ``lvm_facts`` when lvm or lvm2 is not installed on linux (https://github.com/ansible/ansible/issues/17393)
- shell plugins now give a more user friendly error when fed the wrong type of data.
- template module/lookup - fix ``convert_data`` option that was effectively always set to True for Jinja macros (https://github.com/ansible/ansible/issues/78141)
- unarchive - if unzip is available but zipinfo is not, use unzip -Z instead of zipinfo (https://github.com/ansible/ansible/issues/76959).
- uri - properly use uri parameter use_proxy (https://github.com/ansible/ansible/issues/58632)
- uri module - failed status when Authentication Bearer used with netrc, because Basic authentication was by default. Fix now allows to ignore netrc by changing use_netrc=False (https://github.com/ansible/ansible/issues/74397).
- urls - Guard imports of ``urllib3`` by catching ``Exception`` instead of ``ImportError`` to prevent exceptions in the import process of optional dependencies from preventing use of ``urls.py`` (https://github.com/ansible/ansible/issues/78648)
- user - Fix error "Permission denied" in user module while generating SSH keys (https://github.com/ansible/ansible/issues/78017).
- user - fix creating a local user if the user group already exists (https://github.com/ansible/ansible/pull/75042)
- user module - Replace uses of the deprecated ``spwd`` python module with ctypes (https://github.com/ansible/ansible/pull/78050)
- validate-modules - fix validating version_added for new options.
- variablemanager, more efficient read of vars files
- vault secrets file now executes in the correct context when it is a symlink (not resolved to canonical file).
- wait_for - Read file and perform comparisons using bytes to avoid decode errors (https://github.com/ansible/ansible/issues/78214)
- winrm - Ensure ``kinit`` is run with the same ``PATH`` env var as the Ansible process
- winrm connection now handles default to inventory_hostname correctly.
- yaml inventory plugin - fix the error message for non-string hostnames (https://github.com/ansible/ansible/issues/77519).
- yum - fix traceback when ``releasever`` is specified with ``latest`` (https://github.com/ansible/ansible/issues/78058)

View File

@ -1,2 +1,803 @@
ancestor: 2.13.0
releases: {}
releases:
2.14.0b1:
changes:
breaking_changes:
- Allow for lazy evaluation of Jinja2 expressions (https://github.com/ansible/ansible/issues/56017)
- The default ansible-galaxy role skeletons no longer contain .travis.yml files.
You can configure ansible-galaxy to use a custom role skeleton that contains
a .travis.yml file to continue using Galaxy's integration with Travis CI.
- ansible - At startup the filesystem encoding and locale are checked to verify
they are UTF-8. If not, the process exits with an error reporting the errant
encoding.
- ansible - Increase minimum Python requirement to Python 3.9 for CLI utilities
and controller code
- ansible-test - At startup the filesystem encoding is checked to verify it
is UTF-8. If not, the process exits with an error reporting the errant encoding.
- ansible-test - At startup the locale is configured as ``en_US.UTF-8``, with
a fallback to ``C.UTF-8``. If neither encoding is available the process exits
with an error. If the fallback is used, a warning is displayed. In previous
versions the ``en_US.UTF-8`` locale was always requested. However, no startup
checking was performed to verify the locale was successfully configured.
- strategy plugins - Make ``ignore_unreachable`` to increase ``ignored`` and
``ok`` and counter, not ``skipped`` and ``unreachable``. (https://github.com/ansible/ansible/issues/77690)
bugfixes:
- '"meta: refresh_inventory" does not clobber entries added by add_host/group_by
anymore.'
- Add PyYAML >= 5.1 as a dependency of ansible-core to be compatible with Python
3.8+.
- Avoid 'unreachable' error when chmod on AIX has 255 as return code.
- Bug fix for when handlers were ran on failed hosts after an ``always`` section
was executed (https://github.com/ansible/ansible/issues/52561)
- Do not allow handlers from dynamic includes to be notified (https://github.com/ansible/ansible/pull/78399)
- Ensure handlers observe ``any_errors_fatal`` (https://github.com/ansible/ansible/issues/46447)
- Ensure syntax check errors include playbook filenames
- Ensure the correct ``environment_class`` is set on ``AnsibleJ2Template``
- Error for collection redirects that do not use fully qualified collection
names, as the redirect would be determined by the ``collections`` keyword.
- Fix PluginLoader to mimic Python import machinery by adding module to sys.modules
before exec
- Fix ``-vv`` output for meta tasks to not have an empty message when skipped,
print the skip reason instead. (https://github.com/ansible/ansible/issues/77315)
- Fix an issue where ``ansible_play_hosts`` and ``ansible_play_batch`` were
not properly updated when a failure occured in an explicit block inside the
rescue section (https://github.com/ansible/ansible/issues/78612)
- Fix dnf module documentation to indicate that comparison operators for package
version require spaces around them (https://github.com/ansible/ansible/issues/78295)
- Fix for linear strategy when tasks were executed in incorrect order or even
removed from execution. (https://github.com/ansible/ansible/issues/64611,
https://github.com/ansible/ansible/issues/64999, https://github.com/ansible/ansible/issues/72725,
https://github.com/ansible/ansible/issues/72781)
- Fix for network_cli not getting all relevant connection options
- Fix handlers execution with ``serial`` in the ``linear`` strategy (https://github.com/ansible/ansible/issues/54991)
- Fix potential, but unlikely, cases of variable use before definition.
- Fix traceback when installing a collection from a git repository and git is
not installed (https://github.com/ansible/ansible/issues/77479).
- GALAXY_IGNORE_CERTS reworked to allow each server entry to override
- More gracefully handle separator errors in jinja2 template overrides (https://github.com/ansible/ansible/pull/77495).
- Move undefined check from concat to finalize (https://github.com/ansible/ansible/issues/78156)
- Prevent losing unsafe on results returned from lookups (https://github.com/ansible/ansible/issues/77535)
- Propagate ``ansible_failed_task`` and ``ansible_failed_result`` to an outer
rescue (https://github.com/ansible/ansible/issues/43191)
- Properly execute rescue section when an include task fails in all loop iterations
(https://github.com/ansible/ansible/issues/23161)
- Properly send a skipped message when a list in a ``loop`` is empty and comes
from a template (https://github.com/ansible/ansible/issues/77934)
- Support colons in jinja2 template override values (https://github.com/ansible/ansible/pull/77495).
- '``ansible-galaxy`` - remove extra server api call during dependency resolution
for requirements and dependencies that are already satisfied (https://github.com/ansible/ansible/issues/77443).'
- '`ansible-config init -f vars` will now use shorthand format'
- action plugins now pass cannonical info to modules instead of 'temporary'
info from play_context
- ansible - Exclude Python 2.6 from Python interpreter discovery.
- ansible-config dump - Only display plugin type headers when plugin options
are changed if --only-changed is specified.
- ansible-configi init should now skip internal reserved config entries
- ansible-connection - decrypt vaulted parameters before sending over the socket,
as vault secrets are not available on the other side.
- ansible-console - Renamed the first argument of ``ConsoleCLI.default`` from
``arg`` to ``line`` to match the first argument of the same method on the
base class ``Cmd``.
- ansible-console commands now all have a help entry.
- ansible-console fixed to load modules via fqcn, short names and handle redirects.
- ansible-console now shows installed collection modules.
- ansible-doc - fix listing plugins.
- ansible-doc will not add 'website for' in ":ref:" substitutions as it made
them confusing.
- ansible-doc will not again warn and skip when missing docs, always show the
doc file (for edit on github) and match legacy plugins.
- ansible-doc will not traceback when legacy plugins don't have docs nor adjacent
file with docs
- ansible-doc will now also display until as an 'implicit' templating keyword.
- ansible-doc will now not display version_added_collection under same conditions
it does not display version_added.
- ansible-galaxy - Fix detection of ``--role-file`` in arguments for implicit
role invocation (https://github.com/ansible/ansible/issues/78204)
- ansible-galaxy - Fix exit codes for role search and delete (https://github.com/ansible/ansible/issues/78516)
- ansible-galaxy - Fix loading boolean server options so False doesn't become
a truthy string (https://github.com/ansible/ansible/issues/77416).
- ansible-galaxy - Fix reinitializing the whole collection directory with ``ansible-galaxy
collection init ns.coll --force``. Now directories and files that are not
included in the collection skeleton will be removed.
- ansible-galaxy - Fix unhandled traceback if a role's dependencies in meta/main.yml
or meta/requirements.yml are not lists.
- ansible-galaxy - do not require mandatory keys in the ``galaxy.yml`` of source
collections when listing them (https://github.com/ansible/ansible/issues/70180).
- ansible-galaxy - fix installing collections that have dependencies in the
metadata set to null instead of an empty dictionary (https://github.com/ansible/ansible/issues/77560).
- ansible-galaxy - fix listing collections that contains metadata but the namespace
or name are not strings.
- ansible-galaxy - fix missing meta/runtime.yml in default galaxy skeleton used
for ansible-galaxy collection init
- ansible-galaxy - fix setting the cache for paginated responses from Galaxy
NG/AH (https://github.com/ansible/ansible/issues/77911).
- ansible-galaxy - handle unsupported versions of resolvelib gracefully.
- ansible-galaxy --ignore-certs now has proper precedence over configuration
- ansible-test - Allow disabled, unsupported, unstable and destructive integration
test targets to be selected using their respective prefixes.
- ansible-test - Allow unstable tests to run when targeted changes are made
and the ``--allow-unstable-changed`` option is specified (resolves https://github.com/ansible/ansible/issues/74213).
- ansible-test - Always remove containers after failing to create/run them.
This avoids leaving behind created containers when using podman.
- 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 - Delegation for commands which generate output for programmatic
consumption no longer redirect all output to stdout. The affected commands
and options are ``shell``, ``sanity --lint``, ``sanity --list-tests``, ``integration
--list-targets``, ``coverage analyze``
- ansible-test - Delegation now properly handles arguments given after ``--``
on the command line.
- ansible-test - Don't fail if network cannot be disconnected (https://github.com/ansible/ansible/pull/77472)
- ansible-test - Fix bootstrapping of Python 3.9 on Ubuntu 20.04 remotes.
- ansible-test - Fix change detection for ansible-test's own integration tests.
- ansible-test - Fix internal validation of remote completion configuration.
- 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 - 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.
- ansible-test - Temporary executables are now verified as executable after
creation. Without this check, path injected scripts may not be found, typically
on systems with ``/tmp`` mounted using the "noexec" option. This can manifest
as a missing Python interpreter, or use of the wrong Python interpreter, as
well as other error conditions.
- 'ansible-test - Test configuration for collections is now parsed only once,
prior to delegation. Fixes issue: https://github.com/ansible/ansible/issues/78334'
- ansible-test - Test containers are now run with the ``--tmpfs`` option for
``/tmp``, ``/run`` and ``/run/lock``. This allows use of containers built
without the ``VOLUME`` instruction. Additionally, containers with those volumes
defined no longer create anonymous volumes for them. This avoids leaving behind
volumes on the container host after the container is stopped and deleted.
- ansible-test - The ``shell`` command no longer redirects all output to stdout
when running a provided command. Any command output written to stderr will
be mixed with the stderr output from ansible-test.
- ansible-test - The ``shell`` command no longer requests a TTY when using delegation
unless an interactive shell is being used. An interactive shell is the default
behavior when no command is given to pass to the shell.
- ansible-test - ansible-doc sanity test - Correctly determine the fully-qualified
collection name for plugins in subdirectories, resolving https://github.com/ansible/ansible/issues/78490.
- ansible-test - validate-modules - Documentation-only modules, used for documenting
actions, are now allowed to have docstrings (https://github.com/ansible/ansible/issues/77972).
- 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).
- apt - Fix module failure when a package is not installed and only_upgrade=True.
Skip that package and check the remaining requested packages for upgrades.
(https://github.com/ansible/ansible/issues/78762)
- apt - don't actually update the cache in check mode with update_cache=true.
- apt - don't mark existing packages as manually installed in check mode (https://github.com/ansible/ansible/issues/66413).
- apt - fix package selection to include /etc/apt/preferences(.d) (https://github.com/ansible/ansible/issues/77969)
- apt module now correctly handles virtual packages.
- arg_spec - Fix incorrect ``no_log`` warning when a parameter alias is used
(https://github.com/ansible/ansible/pull/77576)
- callback plugins - do not crash when ``exception`` passed from a module is
not a string (https://github.com/ansible/ansible/issues/75726, https://github.com/ansible/ansible/pull/77781).
- cli now emits clearer error on no hosts selected
- config, ensure that pulling values from configmanager are templated if possible.
- display itself should be single source of 'verbosity' level to the engine.
- dnf - Condense a few internal boolean returns.
- dnf - The ``nobest`` option now also works for ``state=latest``.
- dnf - The ``skip_broken`` option is now used in installs (https://github.com/ansible/ansible/issues/73072).
- dnf - fix output parsing on systems with ``LANGUAGE`` set to a language other
than English (https://github.com/ansible/ansible/issues/78193)
- facts - fix IP address discovery for specific interface names (https://github.com/ansible/ansible/issues/77792).
- 'facts - fix processor facts on AIX: correctly detect number of cores and
threads, turn ``processor`` into a list (https://github.com/ansible/ansible/pull/78223).'
- fetch_file - Ensure we only use the filename when calculating a tempfile,
and do not incude the query string (https://github.com/ansible/ansible/issues/29680)
- fetch_file - properly split files with multiple file extensions (https://github.com/ansible/ansible/pull/75257)
- file - setting attributes of symbolic links or files that are hard linked
no longer fails when the link target is unspecified (https://github.com/ansible/ansible/issues/76142).
- file backed cache plugins now handle concurrent access by making atomic updates
to the files.
- git module fix docs and proper use of ssh wrapper script and GIT_SSH_COMMAND
depending on version.
- if a config setting prevents running ansible it should at least show it's
"origin".
- include module - add docs url to include deprecation message (https://github.com/ansible/ansible/issues/76684).
- items2dict - Handle error if an item is not a dictionary or is missing the
required keys (https://github.com/ansible/ansible/issues/70337).
- local facts - if a local fact in the facts directory cannot be stated, store
an error message as the fact value and emit a warning just as if just as if
the facts execution has failed. The stat can fail e.g. on dangling symlinks.
- lookup plugin - catch KeyError when lookup returns dictionary (https://github.com/ansible/ansible/pull/77789).
- module_utils - Make distro.id() report newer versions of OpenSuSE (at least
>=15) also report as ``opensuse``. They report themselves as ``opensuse-leap``.
- module_utils.service - daemonize - Avoid modifying the list of file descriptors
while iterating over it.
- null_representation config entry changed to 'raw' as it must allow 'none/null'
and empty string.
- paramiko - Add a new option to allow paramiko >= 2.9 to easily work with all
devices now that rsa-sha2 support was added to paramiko, which prevented communication
with numerous platforms. (https://github.com/ansible/ansible/issues/76737)
- paramiko - Add back support for ``ssh_args``, ``ssh_common_args``, and ``ssh_extra_args``
for parsing the ``ProxyCommand`` (https://github.com/ansible/ansible/issues/78750)
- password lookup does not ignore k=v arguments anymore.
- pause module will now report proper 'echo' vs always being true.
- 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).
- plugin loader, now when skipping a plugin due to an abstract method error
we provide that in 'verbose' mode instead of totally obscuring the error.
The current implementation assumed only the base classes would trigger this
and failed to consider 'in development' plugins.
- prevent lusermod from using group name instead of group id (https://github.com/ansible/ansible/pull/77914)
- prevent type annotation shim failures from causing runtime failures (https://github.com/ansible/ansible/pull/77860)
- psrp connection now handles default to inventory_hostname correctly.
- roles, fixed issue with roles loading paths not contained in the role itself
when using the `_from` options.
- setup - Adds a default value to ``lvm_facts`` when lvm or lvm2 is not installed
on linux (https://github.com/ansible/ansible/issues/17393)
- shell plugins now give a more user friendly error when fed the wrong type
of data.
- template module/lookup - fix ``convert_data`` option that was effectively
always set to True for Jinja macros (https://github.com/ansible/ansible/issues/78141)
- unarchive - if unzip is available but zipinfo is not, use unzip -Z instead
of zipinfo (https://github.com/ansible/ansible/issues/76959).
- uri - properly use uri parameter use_proxy (https://github.com/ansible/ansible/issues/58632)
- uri module - failed status when Authentication Bearer used with netrc, because
Basic authentication was by default. Fix now allows to ignore netrc by changing
use_netrc=False (https://github.com/ansible/ansible/issues/74397).
- urls - Guard imports of ``urllib3`` by catching ``Exception`` instead of ``ImportError``
to prevent exceptions in the import process of optional dependencies from
preventing use of ``urls.py`` (https://github.com/ansible/ansible/issues/78648)
- user - Fix error "Permission denied" in user module while generating SSH keys
(https://github.com/ansible/ansible/issues/78017).
- user - fix creating a local user if the user group already exists (https://github.com/ansible/ansible/pull/75042)
- user module - Replace uses of the deprecated ``spwd`` python module with ctypes
(https://github.com/ansible/ansible/pull/78050)
- validate-modules - fix validating version_added for new options.
- variablemanager, more efficient read of vars files
- vault secrets file now executes in the correct context when it is a symlink
(not resolved to canonical file).
- wait_for - Read file and perform comparisons using bytes to avoid decode errors
(https://github.com/ansible/ansible/issues/78214)
- winrm - Ensure ``kinit`` is run with the same ``PATH`` env var as the Ansible
process
- winrm connection now handles default to inventory_hostname correctly.
- yaml inventory plugin - fix the error message for non-string hostnames (https://github.com/ansible/ansible/issues/77519).
- yum - fix traceback when ``releasever`` is specified with ``latest`` (https://github.com/ansible/ansible/issues/78058)
deprecated_features:
- Deprecate ability of lookup plugins to return arbitrary data. Lookup plugins
must return lists, failing to do so will be an error in 2.18. (https://github.com/ansible/ansible/issues/77788)
- Encryption - Deprecate use of the Python crypt module due to it's impending
removal from Python 3.13
- PlayContext.verbosity is deprecated and will be removed in 2.18. Use ansible.utils.display.Display().verbosity
as the single source of truth.
- '``DEFAULT_FACT_PATH``, ``DEFAULT_GATHER_SUBSET`` and ``DEFAULT_GATHER_TIMEOUT``
are deprecated and will be removed in 2.18. Use ``module_defaults`` keyword
instead.'
- '``PlayIterator`` - deprecate ``cache_block_tasks`` and ``get_original_task``
which are noop and unused.'
- '``Templar`` - deprecate ``shared_loader_obj`` option which is unused. ``ansible.plugins.loader``
is used directly instead.'
- listify_lookup_plugin_terms, deprecate 'loader/dataloader' parameter as it
not used.
- vars plugins - determining whether or not to run ansible.legacy vars plugins
with the class attribute REQUIRES_WHITELIST is deprecated, set REQUIRES_ENABLED
instead.
major_changes:
- Move handler processing into new ``PlayIterator`` phase to use the configured
strategy (https://github.com/ansible/ansible/issues/65067)
- ansible - At startup the filesystem encoding and locale are checked to verify
they are UTF-8. If not, the process exits with an error reporting the errant
encoding.
- ansible - Increase minimum Python requirement to Python 3.9 for CLI utilities
and controller code
- ansible-test - At startup the filesystem encoding is checked to verify it
is UTF-8. If not, the process exits with an error reporting the errant encoding.
- ansible-test - At startup the locale is configured as ``en_US.UTF-8``, with
a fallback to ``C.UTF-8``. If neither encoding is available the process exits
with an error. If the fallback is used, a warning is displayed. In previous
versions the ``en_US.UTF-8`` locale was always requested. However, no startup
checking was performed to verify the locale was successfully configured.
minor_changes:
- Add a new "INVENTORY_UNPARSED_WARNING" flag add to hide the "No inventory
was parsed, only implicit localhost is available" warning
- "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"
- Add support for parsing ``-a`` module options as JSON and not just key=value
arguments - https://github.com/ansible/ansible/issues/78112
- Added Kylin Linux Advanced Server OS in RedHat OS Family.
- Allow ``when`` conditionals to be used on ``flush_handlers`` (https://github.com/ansible/ansible/issues/77616)
- Allow meta tasks to be used as handlers.
- Display - The display class will now proxy calls to Display.display via the
queue from forks/workers to be handled by the parent process for actual display.
This reduces some reliance on the fork start method and improves reliability
of displaying messages.
- Jinja version test - Add pep440 version_type for version test. (https://github.com/ansible/ansible/issues/78288)
- Loops - Add new ``loop_control.extended_allitems`` to allow users to disable
tracking all loop items for each loop (https://github.com/ansible/ansible/issues/75216)
- NetBSD - Add uptime_seconds fact
- Provide a `utc` option for strftime to show time in UTC rather than local
time
- Raise a proper error when ``include_role`` or ``import_role`` is used as a
handler.
- Remove the ``AnsibleContext.resolve`` method as its override is not necessary.
Furthermore the ability to override the ``resolve`` method was deprecated
in Jinja 3.0.0 and removed in Jinja 3.1.0.
- Utilize @classmethod and @property together to form classproperty (Python
3.9) to access field attributes of a class
- '``LoopControl`` is now templated through standard ``post_validate`` method
(https://github.com/ansible/ansible/pull/75715)'
- '``ansible-galaxy collection install`` - add an ``--offline`` option to prevent
querying distribution servers (https://github.com/ansible/ansible/issues/77443).'
- ansible - Add support for Python 3.11 to Python interpreter discovery.
- ansible - At startup the stdin/stdout/stderr file handles are checked to verify
they are using blocking IO. If not, the process exits with an error reporting
which file handle(s) are using non-blocking IO.
- ansible-config adds JSON and YAML output formats for list and dump actions.
- ansible-connection now supports verbosity directly on cli
- ansible-console added 'collections' command to match playbook keyword.
- ansible-doc - remove some of the manual formatting, and use YAML more uniformly.
This in particular means that ``true`` and ``false`` are used for boolean
values, instead of ``True`` and ``False`` (https://github.com/ansible/ansible/pull/78668).
- 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-galaxy now supports a user defined timeout, instead of existing hardcoded
60s (now the default).
- ansible-test - Add FreeBSD 13.1 remote support.
- ansible-test - Add RHEL 9.0 remote support.
- ansible-test - Add support for Python 3.11.
- ansible-test - Add support for RHEL 8.6 remotes.
- 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 provisioning Alpine 3.16 remote instances.
- ansible-test - Add support for provisioning Fedora 36 remote instances.
- ansible-test - Add support for provisioning Ubuntu 20.04 remote instances.
- ansible-test - Add support for provisioning remotes which require ``doas``
for become.
- ansible-test - Add support for running non-interactive commands with ``ansible-test
shell``.
- ansible-test - Alpine remotes now use ``sudo`` for tests, using ``doas`` only
for bootstrapping.
- 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.
- ansible-test - Avoid using the ``mock_use_standalone_module`` setting for
unit tests running on Python 3.8 or later.
- ansible-test - Become support for remote instance provisioning is no longer
tied to a fixed list of platforms.
- 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 - Distribution specific test containers are now multi-arch, supporting
both x86_64 and aarch64.
- ansible-test - Distribution specific test containers no longer contain a ``/etc/ansible/hosts``
file.
- ansible-test - Enable loading of ``coverage`` data files created by older
supported ansible-test releases.
- ansible-test - Fedora 36 has been added as a test container.
- ansible-test - FreeBSD remotes now use ``sudo`` for tests, using ``su`` only
for bootstrapping.
- ansible-test - Improve consistency of output messages by using stdout or stderr
for most output, but not both.
- ansible-test - Remote Alpine instances now have the ``acl`` package installed.
- ansible-test - Remote Fedora instances now have the ``acl`` package installed.
- ansible-test - Remote FreeBSD instances now have ACLs enabled on the root
filesystem.
- ansible-test - Remote Ubuntu instances now have the ``acl`` package installed.
- ansible-test - Remove Fedora 34 test container.
- ansible-test - Remove Fedora 35 test container.
- ansible-test - Remove FreeBSD 13.0 remote support.
- ansible-test - Remove RHEL 8.5 remote support.
- ansible-test - Remove Ubuntu 18.04 test container.
- ansible-test - Remove support for Python 2.7 on provisioned FreeBSD instances.
- ansible-test - Remove support for Python 3.8 on the controller.
- ansible-test - Remove the ``opensuse15py2`` container.
- ansible-test - Support multiple pinned versions of the ``coverage`` module.
The version used now depends on the Python version in use.
- ansible-test - Test containers have been updated to remove the ``VOLUME``
instruction.
- ansible-test - The Alpine 3 test container has been updated to Alpine 3.16.0.
- ansible-test - The ``http-test-container`` container is now multi-arch, supporting
both x86_64 and aarch64.
- ansible-test - The ``pypi-test-container`` container is now multi-arch, supporting
both x86_64 and aarch64.
- ansible-test - The ``shell`` command can be used outside a collection if no
controller delegation is required.
- ansible-test - The openSUSE test container has been updated to openSUSE Leap
15.4.
- ansible-test - Ubuntu 22.04 has been added as a test container.
- ansible-test - Update pinned sanity test requirements for all tests.
- ansible-test - Update the ``base`` container to 3.4.0.
- ansible-test - Update the ``default`` containers to 6.6.0.
- apt_repository remove dependency on apt-key and use gpg + /usr/share/keyrings
directly instead
- blockinfile - The presence of the multiline flag (?m) in the regular expression
for insertafter opr insertbefore controls whether the match is done line by
line or with multiple lines (https://github.com/ansible/ansible/pull/75090).
- calls to listify_lookup_plugin_terms in core do not pass in loader/dataloader
anymore.
- collections - ``ansible-galaxy collection build`` can now utilize ``MANIFEST.in``
style directives from ``galaxy.yml`` instead of ``build_ignore`` effectively
inverting the logic from include by default, to exclude by default. (https://github.com/ansible/ansible/pull/78422)
- config manager, move templating into main query function in config instead
of constants
- config manager, remove updates to configdata as it is mostly unused
- configuration entry INTERPRETER_PYTHON_DISTRO_MAP is now 'private' and won't
show up in normal configuration queries and docs, since it is not 'settable'
this avoids user confusion.
- distribution - add distribution_minor_version for Debian Distro (https://github.com/ansible/ansible/issues/74481).
- documentation construction now gives more information on error.
- facts - add OSMC to Debian os_family mapping
- get_url - permit to pass to parameter ``checksum`` an URL pointing to a file
containing only a checksum (https://github.com/ansible/ansible/issues/54390).
- new tests url, uri and urn will verify string as such, but they don't check
existance of the resource
- plugin loader - add ansible_name and ansible_aliases attributes to plugin
objects/classes.
- systemd is now systemd_service to better reflect the scope of the module,
systemd is kept as an alias for backwards compatibility.
- templating - removed internal template cache
- uri - cleanup write_file method, remove overkill safety checks and report
any exception, change shutilcopyfile to use module.atomic_move
- urls - Add support to specify SSL/TLS ciphers to use during a request (https://github.com/ansible/ansible/issues/78633)
- 'validate-modules - Allow ``type: raw`` on a module return type definition
for values that have a dynamic type'
- version output now includes the path to the python executable that Ansible
is running under
- yum_repository - do not give the ``async`` parameter a default value anymore,
since this option is deprecated in RHEL 8. This means that ``async = 1`` won't
be added to repository files if omitted, but it can still be set explicitly
if needed.
release_summary: '| Release Date: 2022-09-26
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
'
removed_features:
- PlayIterator - remove deprecated ``PlayIterator.ITERATING_*`` and ``PlayIterator.FAILED_*``
- Remove deprecated ``ALLOW_WORLD_READABLE_TMPFILES`` configuration option (https://github.com/ansible/ansible/issues/77393)
- Remove deprecated ``COMMAND_WARNINGS`` configuration option (https://github.com/ansible/ansible/issues/77394)
- Remove deprecated ``DISPLAY_SKIPPED_HOSTS`` environment variable (https://github.com/ansible/ansible/issues/77396)
- Remove deprecated ``LIBVIRT_LXC_NOSECLABEL`` environment variable (https://github.com/ansible/ansible/issues/77395)
- Remove deprecated ``NETWORK_GROUP_MODULES`` environment variable (https://github.com/ansible/ansible/issues/77397)
- Remove deprecated ``UnsafeProxy``
- Remove deprecated ``plugin_filters_cfg`` config option from ``default`` section
(https://github.com/ansible/ansible/issues/77398)
- Remove deprecated functionality that allows loading cache plugins directly
without using ``cache_loader``.
- Remove deprecated functionality that allows subclassing ``DefaultCallback``
without the corresponding ``doc_fragment``.
- Remove deprecated powershell functions ``Load-CommandUtils`` and ``Import-PrivilegeUtil``
- apt_key - remove deprecated ``key`` module param
- command/shell - remove deprecated ``warn`` module param
- get_url - remove deprecated ``sha256sum`` module param
- import_playbook - remove deprecated functionality that allows providing additional
parameters in free form
codename: C'mon Everybody
fragments:
- 17393-fix_silently_failing_lvm_facts.yaml
- 23161-includes-loops-rescue.yml
- 29680-fetch-file-file-name-too-long.yml
- 43191-72638-ansible_failed_task-fixes.yml
- 56017-allow-lazy-eval-on-jinja2-expr.yml
- 58632-uri-include_use_proxy.yaml
- 61965-user-module-fails-to-change-primary-group.yml
- 64612-fetch_file-multi-part-extension.yml
- 65499-no_inventory_parsed.yml
- 70180-collection-list-more-robust.yml
- 73072-dnf-skip-broken.yml
- 74446-network-conn-options.yaml
- 74481_debian_minor_version.yml
- 75042-lowercase-dash-n-with-luseradd-on-all-distros.yml
- 75090-multiline-flag-support-for-blockinfile.yml
- 75216-loop-control-extended-allitems.yml
- 75364-yum-repository-async.yml
- 75431-Add-uptime-fact-for-NetBSD.yml
- 75715-post_validate-LoopControl.yml
- 75740-remove-travis-file-from-role-skeletons.yml
- 76167-update-attributes-of-files-that-are-links.yml
- 76737-paramiko-rsa-sha2.yml
- 76971-unarchive-remove-unnecessary-zipinfo-dependency.yml
- 77014-ansible-galaxy-list-fix-null-metadata-namespace-name.yml
- 77265-module_defaults-with-modules-as-redirected-actions.yaml
- 77315-fix-meta-vv-header.yml
- 77393-remove-allow_world_readable_tmpfiles.yml
- 77394-remove-command_warnings.yml
- 77395-remove-libvirt_lxc_noseclabel.yml
- 77396-remove-display_skipped_hosts.yml
- 77397-remove-network_group_modules.yml
- 77398-remove-plugin_filters_cfg-default.yml
- 77418-ansible-galaxy-init-include-meta-runtime.yml
- 77424-fix-False-ansible-galaxy-server-config-options.yaml
- 77465-ansible-test-compile-crash.yml
- 77468-ansible-galaxy-remove-unnecessary-api-call.yml
- 77472-ansible-test-network-disconnect-warning.yml
- 77493-ansible-galaxy-find-git-executable-before-using.yaml
- 77507-deprecate-pc-verbosity.yml
- 77535-prevent-losing-unsafe-lookups.yml
- 77544-fix-error-yaml-inventory-int-hostnames.yml
- 77561-ansible-galaxy-coll-install-null-dependencies.yml
- 77576-arg_spec-no_log-aliases.yml
- 77599-add-url-include-deprecation.yml
- 77630-ansible-galaxy-fix-unsupported-resolvelib-version.yml
- 77649-support-recent-resolvelib-versions.yml
- 77679-syntax-error-mention-filename.yml
- 77693-actually-ignore-unreachable.yml
- 77781-callback-crash.yml
- 77788-deprecate-non-lists-lookups.yml
- 77789-catch-keyerror-lookup-dict.yml
- 77792-fix-facts-discovery-specific-interface-names.yml
- 77898-ansible-config-dump-only-changed-all-types.yml
- 77934-empty-loop-template-callback.yml
- 77936-add-pyyaml-version.yml
- 77969-apt-preferences.yml
- 78050-replace-spwd.yml
- 78058-yum-releasever-latest.yml
- 78112-adhoc-args-as-json.yml
- 78141-template-fix-convert_data.yml
- 78156-undefined-check-in-finalize.yml
- 78204-galaxy-role-file-detection.yml
- 78214-wait-for-compare-bytes.yml
- 78223_aix_fix_processor_facts.yml
- 78295-dnf-fix-comparison-operators-docs.yml
- 78325-ansible-galaxy-fix-caching-paginated-responses-from-v3-servers.yml
- 78496-fix-apt-check-mode.yml
- 78512-uri-use-netrc-true-false-argument.yml
- 78516-galaxy-cli-exit-codes.yml
- 78562-deprecate-vars-plugin-attr.yml
- 78612-rescue-block-ansible_play_hosts.yml
- 78633-urls-ciphers.yml
- 78648-urllib3-import-exceptions.yml
- 78668-ansible-doc-formatting.yml
- 78678-add-a-g-install-offline.yml
- 78700-add-plugin-name-and-aliases.yml
- 78750-paramiko-ssh-args-compat.yml
- 78781-fix-apt-only_upgrade-behavior.yml
- abstract_errors_info.yml
- add-omsc-os-family.yml
- added_uri_tests.yml
- adoc_moarf.yml
- aix_chmod_255.yml
- ansible-connection_decode.yml
- ansible-console-renamed-arg.yml
- ansible-galaxy-collection-init-force.yml
- ansible-require-blocking-io.yml
- ansible-require-utf8.yml
- ansible-test-ansible-core-mock.yml
- ansible-test-ansible-doc-sanity-fqcn.yml
- ansible-test-container-tmpfs.yml
- ansible-test-containers-no-volume.yml
- ansible-test-content-config.yml
- ansible-test-coverage.yml
- ansible-test-default-containers.yml
- ansible-test-distro-containers-hosts.yml
- ansible-test-distro-containers.yml
- ansible-test-drop-python-3.8-controller.yml
- ansible-test-fedora-35.yml
- ansible-test-filter-options.yml
- ansible-test-generalize-become.yml
- ansible-test-integration-targets-filter.yml
- ansible-test-less-python-2.7.yml
- ansible-test-locale.yml
- ansible-test-more-remotes.yml
- ansible-test-multi-arch-cloud-containers.yml
- ansible-test-multi-arch-distro-containers.yml
- ansible-test-multi-arch-remotes.yml
- ansible-test-pip-bootstrap.yml
- ansible-test-podman-create-retry.yml
- ansible-test-remote-acl.yml
- ansible-test-remote-become.yml
- ansible-test-remote-completion-validation.yml
- ansible-test-remotes.yml
- ansible-test-rhel-8.6.yml
- ansible-test-sanity-requirements.yml
- ansible-test-self-change-classification.yml
- ansible-test-shell-features.yml
- ansible-test-subprocess-isolation.yml
- ansible-test-target-filter.yml
- ansible-test-target-options.yml
- ansible-test-tty-output-handling.yml
- ansible-test-ubuntu-bootstrap-fix.yml
- ansible-test-ubuntu-remote.yml
- ansible-test-validate-modules-docs-only-docstring.yml
- ansible-test-verify-executables.yml
- ansible_connection_verbosity.yml
- apt_key-remove-deprecated-key.yml
- apt_repository_sans_apt_key.yml
- apt_virtual_fix.yml
- atomic_cache_files.yml
- better-msg-role-in-handler.yml
- better_info_sources.yml
- better_nohosts_error.yml
- collection-build-manifest.yml
- config_error_origin.yml
- config_formats.yml
- config_load_by_name.yml
- config_manager_changes.yml
- console_list_all.yml
- deprecate-crypt-support.yml
- deprecate-fact_path-gather_subset-gather_timeout-defaults.yml
- display_verbosity.yml
- dnf-fix-locale-language.yml
- doc_errors.yml
- doc_vac_ignore.yml
- dont-expose-included-handlers.yml
- ensure_config_always_templated.yml
- fieldattributes-classproperty.yml
- fix-change-while-iterating-module-utils-service.yml
- fix_adoc_text.yml
- fix_init_commented.yml
- fix_inv_refresh.yml
- forked-display-via-queue.yml
- galaxy_server_timeout.yml
- get_url-accept-file-for-checksum.yml
- get_url-remove-deprecated-sha256sum.yml
- git_fixes.yml
- handle-role-dependency-type-error.yml
- hide_distro_map.yml
- import_playbook-remove-params.yml
- items2dict-error-handling.yml
- kylin_linux_advanced_server_distribution_support.yml
- legacy_no_file_skip.yml
- loader_in_listify.yml
- local_fact_unreadable.yml
- null_means_none.yml
- opensuse_disto_id.yml
- password_lookup_fix.yml
- pause_echo_fix.yml
- pep440-version-type.yml
- permission-denied-spwd-module.yml
- pip-lazy-import.yml
- play_iterator-remove_deprecations.yml
- play_iterator_iterating_handlers.yml
- playiterator-deprecate-methods.yml
- plugin-loader-deterministic-fuzzy-match.yml
- powershell-deprecated-functions.yml
- python-2.6-discovery.yml
- python-3.11.yml
- python39-min-controller.yml
- python_version_path.yml
- remove-ansiblecontext-resolve.yml
- remove-deprecated-default-callback-without-doc.yml
- remove-import-cache-plugin-directly.yml
- require-fqcn-redirects.yml
- restrict_role_files_to_role.yml
- self_referential.yml
- shell_env_typeerror.yml
- strftime-in-utc.yml
- systemd_services.yml
- templar-correct-environment_class-template.yml
- templar-deprecate-shared_loader_obj.yml
- template_override.yml
- type_shim_exception_swallow.yml
- unsafeproxy-deprecated.yml
- until_also_implicit.yml
- use-before-definition.yml
- v2.14.0-initial-commit.yaml
- v2.14.0b1_summary.yaml
- validate-modules-module-raw-return-type.yml
- validate-modules-version_added.yaml
- vault_syml_allow.yml
- vm_more_efficient.yml
- windows_conn_option_fix.yml
- winrm-kinit-path.yml
- write_file_uri_cleanup.yml
- zap_template_cache.yml
release_date: '2022-09-26'
2.14.0b2:
changes:
breaking_changes:
- ansible-test validate-modules - Removed the ``missing-python-doc`` error code
in validate modules, ``missing-documentation`` is used instead for missing
PowerShell module documentation.
bugfixes:
- Fix reusing a connection in a task loop that uses a redirected or aliased
name - https://github.com/ansible/ansible/issues/78425
- Fix setting become activation in a task loop - https://github.com/ansible/ansible/issues/78425
- apt module should not traceback on invalid type given as package. issue 78663.
- known_hosts - do not return changed status when a non-existing key is removed
(https://github.com/ansible/ansible/issues/78598)
- plugin loader, fix detection for existing configuration before initializing
for a plugin
minor_changes:
- ansible-test validate-modules - Added support for validating module documentation
stored in a sidecar file alongside the module (``{module}.yml`` or ``{module}.yaml``).
Previously these files were ignored and documentation had to be placed in
``{module}.py``.
- apt_repository will use the trust repo directories in order of preference
(more appropriate to less) as they exist on the target.
release_summary: '| Release Date: 2022-10-03
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
'
codename: C'mon Everybody
fragments:
- 78881-fix-known-hosts-wrong-changed-status.yaml
- apt_notb.yml
- apt_repo_trust_prefs.yml
- become-loop-setting.yml
- plugin_loader_fix.yml
- v2.14.0b2_summary.yaml
- validate-modules-sidecar.yml
release_date: '2022-10-03'
2.14.0b3:
changes:
bugfixes:
- Do not crash when templating an expression with a test or filter that is not
a valid Ansible filter name (https://github.com/ansible/ansible/issues/78912,
https://github.com/ansible/ansible/pull/78913).
- 'handlers - fix an issue where the ``flush_handlers`` meta task could not
be used with FQCN: ``ansible.builtin.meta`` (https://github.com/ansible/ansible/issues/79023)'
- keyword inheritance - Ensure that we do not squash keywords in validate (https://github.com/ansible/ansible/issues/79021)
- omit on keywords was resetting to default value, ignoring inheritance.
- service_facts - Use python re to parse service output instead of grep (https://github.com/ansible/ansible/issues/78541)
release_summary: '| Release Date: 2022-10-10
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
'
codename: C'mon Everybody
fragments:
- 78541-service-facts-re.yml
- 78913-template-missing-filter-test.yml
- 79021-dont-squash-in-validate.yml
- 79023-fix-flush_handlers-fqcn.yml
- fix_omit_key.yml
- v2.14.0b3_summary.yaml
plugins:
test:
- description: is the string a valid URI
name: uri
namespace: null
- description: is the string a valid URL
name: url
namespace: null
- description: is the string a valid URN
name: urn
namespace: null
release_date: '2022-10-10'
2.14.0rc1:
changes:
bugfixes:
- BSD network facts - Do not assume column indexes, look for ``netmask`` and
``broadcast`` for determining the correct columns when parsing ``inet`` line
(https://github.com/ansible/ansible/issues/79117)
- ansible-config limit shorthand format to assigned values
- ansible-test - Update the ``pylint`` sanity test to use version 2.15.4.
release_summary: '| Release Date: 2022-10-17
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
'
codename: C'mon Everybody
fragments:
- 79117-bsd-ifconfig-inet-fix.yml
- adjust_config_list.yml
- ansible-test-pylint-2.15.4.yml
- v2.14.0rc1_summary.yaml
release_date: '2022-10-13'

View File

@ -0,0 +1,5 @@
bugfixes:
- paramiko - Add a new option to allow paramiko >= 2.9 to easily work with
all devices now that rsa-sha2 support was added to paramiko, which
prevented communication with numerous platforms.
(https://github.com/ansible/ansible/issues/76737)

View File

@ -0,0 +1,3 @@
bugfixes:
- service_facts - Use python re to parse service output instead of grep
(https://github.com/ansible/ansible/issues/78541)

View File

@ -0,0 +1,3 @@
bugfixes:
- paramiko - Add back support for ``ssh_args``, ``ssh_common_args``, and ``ssh_extra_args`` for parsing the ``ProxyCommand``
(https://github.com/ansible/ansible/issues/78750)

View File

@ -0,0 +1,2 @@
bugfixes:
- known_hosts - do not return changed status when a non-existing key is removed (https://github.com/ansible/ansible/issues/78598)

View File

@ -0,0 +1,2 @@
bugfixes:
- "Do not crash when templating an expression with a test or filter that is not a valid Ansible filter name (https://github.com/ansible/ansible/issues/78912, https://github.com/ansible/ansible/pull/78913)."

View File

@ -0,0 +1,3 @@
bugfixes:
- keyword inheritance - Ensure that we do not squash keywords in validate
(https://github.com/ansible/ansible/issues/79021)

View File

@ -0,0 +1,2 @@
bugfixes:
- "handlers - fix an issue where the ``flush_handlers`` meta task could not be used with FQCN: ``ansible.builtin.meta`` (https://github.com/ansible/ansible/issues/79023)"

View File

@ -0,0 +1,4 @@
bugfixes:
- BSD network facts - Do not assume column indexes, look for ``netmask`` and
``broadcast`` for determining the correct columns when parsing ``inet`` line
(https://github.com/ansible/ansible/issues/79117)

View File

@ -0,0 +1,2 @@
bugfixes:
- ansible-config limit shorthand format to assigned values

View File

@ -0,0 +1,4 @@
bugfixes:
- ansible-test - Allow disabled, unsupported, unstable and destructive integration test targets to be selected using their respective prefixes.
- ansible-test - Allow unstable tests to run when targeted changes are made and the ``--allow-unstable-changed`` option is specified
(resolves https://github.com/ansible/ansible/issues/74213).

View File

@ -0,0 +1,2 @@
bugfixes:
- ansible-test - Update the ``pylint`` sanity test to use version 2.15.4.

View File

@ -0,0 +1,2 @@
bugfixes:
- apt module should not traceback on invalid type given as package. issue 78663.

View File

@ -0,0 +1,2 @@
minor_changes:
- apt_repository will use the trust repo directories in order of preference (more appropriate to less) as they exist on the target.

View File

@ -0,0 +1,3 @@
bugfixes:
- Fix reusing a connection in a task loop that uses a redirected or aliased name - https://github.com/ansible/ansible/issues/78425
- Fix setting become activation in a task loop - https://github.com/ansible/ansible/issues/78425

View File

@ -0,0 +1,2 @@
bugfixes:
- omit on keywords was resetting to default value, ignoring inheritance.

View File

@ -0,0 +1,2 @@
bugfixes:
- plugin loader, fix detection for existing configuration before initializing for a plugin

View File

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2022-09-26
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__

View File

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2022-10-03
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__

View File

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2022-10-10
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__

View File

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2022-10-17
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__

View File

@ -0,0 +1,9 @@
breaking_changes:
- >-
ansible-test validate-modules - Removed the ``missing-python-doc`` error code in validate modules,
``missing-documentation`` is used instead for missing PowerShell module documentation.
minor_changes:
- >-
ansible-test validate-modules - Added support for validating module documentation stored in a sidecar
file alongside the module (``{module}.yml`` or ``{module}.yaml``). Previously these files were ignored
and documentation had to be placed in ``{module}.py``.

View File

@ -1,7 +1,8 @@
# pip packages required to build docsite
# these requirements are as loosely defined as possible
# if you want known good versions of these dependencies
# use known_good_reqs.txt instead
# use test/sanity/code-smell/docs-build.requirements.txt
# instead
antsibull-docs >= 1.0.0, < 2.0.0
docutils

View File

@ -27,7 +27,7 @@ Let's say we want to test the ``postgresql_user`` module invoked with the ``name
.. code-block:: yaml
- name: Create PostgreSQL user and store module's output to the result variable
postgresql_user:
community.postgresql.postgresql_user:
name: test_user
register: result
@ -37,7 +37,7 @@ Let's say we want to test the ``postgresql_user`` module invoked with the ``name
- result is changed
- name: Check actual system state with another module, in other words, that the user exists
postgresql_query:
community.postgresql.postgresql_query:
query: SELECT * FROM pg_authid WHERE rolename = 'test_user'
register: query_result
@ -129,7 +129,7 @@ To check a task:
2. If the module changes the system state, check the actual system state using at least one other module. For example, if the module changes a file, we can check that the file has been changed by checking its checksum with the :ref:`stat <ansible_collections.ansible.builtin.stat_module>` module before and after the test tasks.
3. Run the same task with ``check_mode: yes`` if check-mode is supported by the module. Check with other modules that the actual system state has not been changed.
4. Cover cases when the module must fail. Use the ``ignore_errors: yes`` option and check the returned message with the ``assert`` module.
4. Cover cases when the module must fail. Use the ``ignore_errors: true`` option and check the returned message with the ``assert`` module.
Example:
@ -139,7 +139,6 @@ Example:
abstract_module:
...
register: result
ignore_errors: yes
- name: Check the task fails and its error message
assert:

View File

@ -189,7 +189,7 @@ With all of the targets now removed, the current state is as if we do not have a
creates: /etc/postgresql/12/
- name: Start PostgreSQL service
service:
ansible.builtin.service:
name: postgresql
state: started
@ -213,9 +213,9 @@ That is enough for our very basic example.
.. code-block:: yaml
- name: Test postgresql_info module
become: yes
become: true
become_user: postgres
postgresql_info:
community.postgresql.postgresql_info:
login_user: postgres
login_db: postgres
register: result

View File

@ -44,7 +44,7 @@ We will add the following code to the file.
# https://github.com/ansible-collections/community.postgresql/issues/NUM
- name: Test user name containing underscore
postgresql_user:
community.postgresql.postgresql_user:
name: underscored_user
register: result
@ -54,7 +54,7 @@ We will add the following code to the file.
- result is changed
- name: Query the database if the user exists
postgresql_query:
community.postgresql.postgresql_query:
query: SELECT * FROM pg_authid WHERE rolename = 'underscored_user'
register: result
@ -108,9 +108,8 @@ We will add the following code to the file.
# https://github.com/ansible-collections/community.postgresql/issues/NUM
# We should also run the same tasks with check_mode: yes. We omit it here for simplicity.
- name: Test for new_option, create new user WITHOUT the attribute
postgresql_user:
name: test_user
add_attribute: no
community.postgresql.postgresql_user:
name: test_user
register: result
- name: Check the module returns what we expect
@ -119,7 +118,7 @@ We will add the following code to the file.
- result is changed
- name: Query the database if the user exists but does not have the attribute (it is NULL)
postgresql_query:
community.postgresql.postgresql_query:
query: SELECT * FROM pg_authid WHERE rolename = 'test_user' AND attribute = NULL
register: result
@ -129,9 +128,8 @@ We will add the following code to the file.
- result.query_result.rowcount == 1
- name: Test for new_option, create new user WITH the attribute
postgresql_user:
community.postgresql.postgresql_user:
name: test_user
add_attribute: yes
register: result
- name: Check the module returns what we expect
@ -140,7 +138,7 @@ We will add the following code to the file.
- result is changed
- name: Query the database if the user has the attribute (it is TRUE)
postgresql_query:
community.postgresql.postgresql_query:
query: SELECT * FROM pg_authid WHERE rolename = 'test_user' AND attribute = 't'
register: result
@ -153,16 +151,16 @@ Then we :ref:`run the tests<collection_run_integration_tests>` with ``postgresql
In reality, we would alternate the tasks above with the same tasks run with the ``check_mode: yes`` option to be sure our option works as expected in check-mode as well. See :ref:`Recommendations on coverage<collection_integration_recommendations>` for details.
If we expect a task to fail, we use the ``ignore_errors: yes`` option and check that the task actually failed and returned the message we expect:
If we expect a task to fail, we use the ``ignore_errors: true`` option and check that the task actually failed and returned the message we expect:
.. code-block:: yaml
- name: Test for fail_when_true option
postgresql_user:
community.postgresql.postgresql_user:
name: test_user
fail_when_true: yes
fail_when_true: true
register: result
ignore_errors: yes
ignore_errors: true
- name: Check the module fails and returns message we expect
assert:

View File

@ -79,6 +79,8 @@ Our IRC channels may require you to register your IRC nickname. If you receive a
as described in the `libera.chat docs <https://libera.chat/guides/findingchannels>`_.
Our channels record history on the Matrix side. The channel history can be viewed in a browser - all channels will report an appropriate link to ``chat.ansible.im`` in their Chanserv entrymsg upon joining the room. Alternatively, a URL of the form ``https://chat.ansible.im/#/room/# {IRC channel name}:libera.chat`` will also work, for example - for the #ansible-docs channel it would be `https://app.element.io/#/room/#ansible-docs:libera.chat`.
.. _general_channels:
General channels

View File

@ -55,6 +55,8 @@ The following table lists the current Steering Committee members. See :ref:`stee
+------------------+---------------+-------------+
| Markus Bergholz | markuman | 2022 |
+------------------+---------------+-------------+
| Maxwell G | gotmax23 | 2022 |
+------------------+---------------+-------------+
| Sorin Sbarnea | ssbarnea | 2021 |
+------------------+---------------+-------------+

View File

@ -94,7 +94,7 @@ The following steps use ``localhost`` as the target host, but you can use the sa
$ python AnsiballZ_ping.py execute
{"invocation": {"module_args": {"data": "debugging_session"}}, "changed": false, "ping": "debugging_session"}
This subcommand inserts the absolute path to ``debug_dir`` as the first item in ``sys.path`` and invokes the script using the arguments in the ``args`` file. You can continue to run the module like this until you understand the problem. Then you can copy the changes back into your real module file and test that the real module works via ``ansible`` or ``ansible-playbook``.
This subcommand inserts the absolute path to ``debug_dir`` as the first item in ``sys.path`` and invokes the script using the arguments in the ``args`` file. You can continue to run the module like this until you understand the problem. Then you can copy the changes back into your real module file and test that the real module works by using the ``ansible`` or ``ansible-playbook``.
.. _simple_debugging:

View File

@ -28,7 +28,7 @@ This example is a simple demonstration that shows how to minimally run a couple
.. literalinclude:: ../../../../examples/scripts/uptime.py
:language: python
.. note:: Ansible emits warnings and errors via the display object, which prints directly to stdout, stderr and the Ansible log.
.. note:: Ansible emits warnings and errors through the display object, which prints directly to stdout, stderr and the Ansible log.
The source code for the ``ansible``
command line tools (``lib/ansible/cli/``) is `available on GitHub <https://github.com/ansible/ansible/tree/devel/lib/ansible/cli>`_.

View File

@ -33,7 +33,9 @@ To start a new collection, run the following command in your collections directo
Both the namespace and collection names use the same strict set of requirements. See `Galaxy namespaces <https://galaxy.ansible.com/docs/contributing/namespaces.html#galaxy-namespaces>`_ on the Galaxy docsite for those requirements.
It will create the structure ``[my_namespace]/[my_collection]/[collection skeleton]``.
.. hint:: If Git is used for version control, the corresponding repository should be initialized in the collection directory.
Once the skeleton exists, you can populate the directories with the content you want inside the collection. See `ansible-collections <https://github.com/ansible-collections/>`_ GitHub Org to get a better idea of what you can place inside a collection.
Reference: the ``ansible-galaxy collection`` command

View File

@ -132,7 +132,9 @@ After configuring one or more distribution servers, build a collection tarball.
collection_dir#> ansible-galaxy collection build
This command builds a tarball of the collection in the current directory, which you can upload to your selected distribution server::
This command builds a tarball of the collection in the current directory, which you can upload to your selected distribution server:
.. code-block:: shell
my_collection/
├── galaxy.yml

View File

@ -199,11 +199,11 @@ To run the plays, users can now use such commands as ``ansible-playbook --e 'tar
tests directory
----------------
Ansible Collections are tested much like Ansible itself, by using the `ansible-test` utility which is released as part of Ansible, version 2.9.0 and newer. Because Ansible Collections are tested using the same tooling as Ansible itself, via `ansible-test`, all Ansible developer documentation for testing is applicable for authoring Collections Tests with one key concept to keep in mind.
Ansible Collections are tested much like Ansible itself, by using the `ansible-test` utility which is released as part of Ansible, version 2.9.0 and newer. Because Ansible Collections are tested using the same tooling as Ansible itself, by using the `ansible-test`, all Ansible developer documentation for testing is applicable for authoring Collections Tests with one key concept to keep in mind.
See :ref:`testing_collections` for specific information on how to test collections with ``ansible-test``.
When reading the :ref:`developing_testing` documentation, there will be content that applies to running Ansible from source code via a git clone, which is typical of an Ansible developer. However, it's not always typical for an Ansible Collection author to be running Ansible from source but instead from a stable release, and to create Collections it is not necessary to run Ansible from source. Therefore, when references of dealing with `ansible-test` binary paths, command completion, or environment variables are presented throughout the :ref:`developing_testing` documentation; keep in mind that it is not needed for Ansible Collection Testing because the act of installing the stable release of Ansible containing `ansible-test` is expected to setup those things for you.
When reading the :ref:`developing_testing` documentation, there will be content that applies to running Ansible from source code through a git clone, which is typical of an Ansible developer. However, it's not always typical for an Ansible Collection author to be running Ansible from source but instead from a stable release, and to create Collections it is not necessary to run Ansible from source. Therefore, when references of dealing with `ansible-test` binary paths, command completion, or environment variables are presented throughout the :ref:`developing_testing` documentation; keep in mind that it is not needed for Ansible Collection Testing because the act of installing the stable release of Ansible containing `ansible-test` is expected to setup those things for you.
.. _meta_runtime_yml:

View File

@ -2,7 +2,7 @@
Developing ``ansible-core``
***************************
Although ``ansible-core`` (the code hosted in the `ansible/ansible repository <https://github.com/ansible/ansible>`_ on GitHub) includes a few plugins that can be swapped out via playbook directives or configuration, much of the code there is not modular. The documents here give insight into how the parts of ``ansible-core`` work together.
Although ``ansible-core`` (the code hosted in the `ansible/ansible repository <https://github.com/ansible/ansible>`_ on GitHub) includes a few plugins that can be swapped out by the playbook directives or configuration, much of the code there is not modular. The documents here give insight into how the parts of ``ansible-core`` work together.
.. toctree::
:maxdepth: 1

View File

@ -7,7 +7,7 @@ Developing dynamic inventory
Ansible can pull inventory information from dynamic sources, including cloud sources, by using the supplied :ref:`inventory plugins <inventory_plugins>`. For details about how to pull inventory information, see :ref:`dynamic_inventory`. If the source you want is not currently covered by existing plugins, you can create your own inventory plugin as with any other plugin type.
In previous versions, you had to create a script or program that could output JSON in the correct format when invoked with the proper arguments.
You can still use and write inventory scripts, as we ensured backwards compatibility via the :ref:`script inventory plugin <script_inventory>`
You can still use and write inventory scripts, as we ensured backwards compatibility through the :ref:`script inventory plugin <script_inventory>`
and there is no restriction on the programming language used.
If you choose to write a script, however, you will need to implement some features yourself such as caching, configuration management, dynamic variable and group composition, and so on.
If you use :ref:`inventory plugins <inventory_plugins>` instead, you can use the Ansible codebase and add these common features automatically.
@ -228,7 +228,7 @@ Before using the cache plugin, you must retrieve a unique cache key by using the
self.load_cache_plugin()
cache_key = self.get_cache_key(path)
Now that you've enabled caching, loaded the correct plugin, and retrieved a unique cache key, you can set up the flow of data between the cache and your inventory using the ``cache`` parameter of the ``parse`` method. This value comes from the inventory manager and indicates whether the inventory is being refreshed (such as via ``--flush-cache`` or the meta task ``refresh_inventory``). Although the cache shouldn't be used to populate the inventory when being refreshed, the cache should be updated with the new inventory if the user has enabled caching. You can use ``self._cache`` like a dictionary. The following pattern allows refreshing the inventory to work in conjunction with caching.
Now that you've enabled caching, loaded the correct plugin, and retrieved a unique cache key, you can set up the flow of data between the cache and your inventory using the ``cache`` parameter of the ``parse`` method. This value comes from the inventory manager and indicates whether the inventory is being refreshed (such as by the ``--flush-cache`` or the meta task ``refresh_inventory``). Although the cache shouldn't be used to populate the inventory when being refreshed, the cache should be updated with the new inventory if the user has enabled caching. You can use ``self._cache`` like a dictionary. The following pattern allows refreshing the inventory to work in conjunction with caching.
.. code-block:: python

View File

@ -20,7 +20,9 @@ resolving those matching the namespace against a :ref:`search path <ansible_sear
active configuration.
To reduce the maintenance burden in a collection or in local modules, you can extract
duplicated code into one or more module utilities and import them into your modules. For example, if you have your own custom modules that import a ``my_shared_code`` library, you can place that into a ``./module_utils/my_shared_code.py`` file like this::
duplicated code into one or more module utilities and import them into your modules. For example, if you have your own custom modules that import a ``my_shared_code`` library, you can place that into a ``./module_utils/my_shared_code.py`` file like this:
.. code-block:: python
from ansible.module_utils.my_shared_code import MySharedCodeClient
@ -68,4 +70,4 @@ Several commonly-used utilities migrated to collections in Ansible 2.10, includi
- ``ismount.py`` migrated to ``ansible.posix.plugins.module_utils.mount.py`` - Single helper function that fixes os.path.ismount
- ``known_hosts.py`` migrated to ``community.general.plugins.module_utils.known_hosts.py`` - utilities for working with known_hosts file
For a list of migrated content with destination collections, see https://github.com/ansible/ansible/blob/devel/lib/ansible/config/ansible_builtin_runtime.yml.
For a list of migrated content with destination collections, see the `runtime.yml file <https://github.com/ansible/ansible/blob/devel/lib/ansible/config/ansible_builtin_runtime.yml>`_.

View File

@ -31,7 +31,7 @@ To contribute a module to most Ansible collections, you must:
Additional requirements may apply for certain collections. Review the individual collection repositories for more information.
Please make sure your module meets these requirements before you submit your PR/proposal. If you have questions, reach out via the ``#ansible-devel`` chat channel (using Matrix at ansible.im or using IRC at `irc.libera.chat <https://libera.chat>`_) or the `Ansible development mailing list <https://groups.google.com/group/ansible-devel>`_.
Please make sure your module meets these requirements before you submit your PR/proposal. If you have questions, reach out by using the ``#ansible-devel`` chat channel (using Matrix at ansible.im or using IRC at `irc.libera.chat <https://libera.chat>`_) or the `Ansible development mailing list <https://groups.google.com/group/ansible-devel>`_.
Contributing to Ansible: subjective requirements
================================================

View File

@ -168,7 +168,7 @@ When creating a new module there are a few things to keep in mind:
- Avoid using try/catch statements over a large code block, rather use them for individual calls so the error message can be more descriptive
- Try and catch specific exceptions when using try/catch statements
- Avoid using PSCustomObjects unless necessary
- Look for common functions in ``./lib/ansible/module_utils/powershell/`` and use the code there instead of duplicating work. These can be imported by adding the line ``#Requires -Module *`` where * is the filename to import, and will be automatically included with the module code sent to the Windows target when run via Ansible
- Look for common functions in ``./lib/ansible/module_utils/powershell/`` and use the code there instead of duplicating work. These can be imported by adding the line ``#Requires -Module *`` where * is the filename to import, and will be automatically included with the module code sent to the Windows target when run through Ansible
- As well as PowerShell module utils, C# module utils are stored in ``./lib/ansible/module_utils/csharp/`` and are automatically imported in a module execution if the line ``#AnsibleRequires -CSharpUtil *`` is present
- C# and PowerShell module utils achieve the same goal but C# allows a developer to implement low level tasks, such as calling the Win32 API, and can be faster in some cases
- Ensure the code runs under Powershell v3 and higher on Windows Server 2012 and higher; if higher minimum Powershell or OS versions are required, ensure the documentation reflects this clearly
@ -412,7 +412,9 @@ PowerShell utils, these are stored in a folder called ``module_utils`` and the f
The below example is a role structure that contains two PowerShell custom module_utils called
``Ansible.ModuleUtils.ModuleUtil1``, ``Ansible.ModuleUtils.ModuleUtil2``, and a C# util containing the namespace
``Ansible.CustomUtil``::
``Ansible.CustomUtil``:
.. code-block:: console
meta/
main.yml
@ -561,7 +563,9 @@ You can test a module with an Ansible playbook. For example:
- Create a playbook in any directory ``touch testmodule.yml``.
- Create an inventory file in the same directory ``touch hosts``.
- Populate the inventory file with the variables required to connect to a Windows host(s).
- Add the following to the new playbook file::
- Add the following to the new playbook file:
.. code-block:: yaml
---
- name: test out windows module
@ -691,7 +695,7 @@ idempotent and does not report changes. For example:
path: C:\temp
state: absent
register: remove_file_check
check_mode: yes
check_mode: true
- name: get result of remove a file (check mode)
win_command: powershell.exe "if (Test-Path -Path 'C:\temp') { 'true' } else { 'false' }"

View File

@ -79,7 +79,7 @@ To access the configuration settings in your plugin, use ``self.get_option(<opti
Configuration sources follow the precedence rules for values in Ansible. When there are multiple values from the same category, the value defined last takes precedence. For example, in the above configuration block, if both ``name_of_ansible_var`` and ``name_of_second_var`` are defined, the value of the ``option_name`` option will be the value of ``name_of_second_var``. Refer to :ref:`general_precedence_rules` for further information.
Plugins that support embedded documentation (see :ref:`ansible-doc` for the list) should include well-formed doc strings. If you inherit from a plugin, you must document the options it takes, either via a documentation fragment or as a copy. See :ref:`module_documenting` for more information on correct documentation. Thorough documentation is a good idea even if you're developing a plugin for local use.
Plugins that support embedded documentation (see :ref:`ansible-doc` for the list) should include well-formed doc strings. If you inherit from a plugin, you must document the options it takes, either through a documentation fragment or as a copy. See :ref:`module_documenting` for more information on correct documentation. Thorough documentation is a good idea even if you're developing a plugin for local use.
Developing particular plugin types
==================================
@ -160,7 +160,7 @@ Cache plugins
Cache plugins store gathered facts and data retrieved by inventory plugins.
Import cache plugins using the cache_loader so you can use ``self.set_options()`` and ``self.get_option(<option_name>)``. If you import a cache plugin directly in the code base, you can only access options via ``ansible.constants``, and you break the cache plugin's ability to be used by an inventory plugin.
Import cache plugins using the cache_loader so you can use ``self.set_options()`` and ``self.get_option(<option_name>)``. If you import a cache plugin directly in the code base, you can only access options by the ``ansible.constants``, and you break the cache plugin's ability to be used by an inventory plugin.
.. code-block:: python
@ -287,7 +287,7 @@ Note that the ``CALLBACK_VERSION`` and ``CALLBACK_NAME`` definitions are require
For example callback plugins, see the source code for the `callback plugins included with Ansible Core <https://github.com/ansible/ansible/tree/devel/lib/ansible/plugins/callback>`_
New in ansible-core 2.11, callback plugins are notified (via ``v2_playbook_on_task_start``) of :ref:`meta<meta_module>` tasks. By default, only explicit ``meta`` tasks that users list in their plays are sent to callbacks.
New in ansible-core 2.11, callback plugins are notified (by the ``v2_playbook_on_task_start``) of :ref:`meta<meta_module>` tasks. By default, only explicit ``meta`` tasks that users list in their plays are sent to callbacks.
There are also some tasks which are generated internally and implicitly at various points in execution. Callback plugins can opt-in to receiving these implicit tasks as well, by setting ``self.wants_implicit_tasks = True``. Any ``Task`` object received by a callback hook will have an ``.implicit`` attribute, which can be consulted to determine whether the ``Task`` originated from within Ansible, or explicitly by the user.
@ -342,7 +342,7 @@ You can see the details for inventory plugins in the :ref:`developing_inventory`
Lookup plugins
--------------
Lookup plugins pull in data from external data stores. Lookup plugins can be used within playbooks both for looping --- playbook language constructs like ``with_fileglob`` and ``with_items`` are implemented via lookup plugins --- and to return values into a variable or parameter.
Lookup plugins pull in data from external data stores. Lookup plugins can be used within playbooks both for looping --- playbook language constructs like ``with_fileglob`` and ``with_items`` are implemented through lookup plugins --- and to return values into a variable or parameter.
Lookup plugins are expected to return lists, even if just a single element.

View File

@ -328,7 +328,7 @@ importing a module. This lets Ansible run both the wrapper script and the module
Python module into the Python interpreter on the remote node. Python
understands scripts on stdin but does not understand zip files.
* Prior to Ansible 2.7, the module was executed via a second Python interpreter instead of being
* Prior to Ansible 2.7, the module was executed by a second Python interpreter instead of being
executed inside of the same process. This change was made once Python-2.4 support was dropped
to speed up module execution.
@ -513,14 +513,14 @@ Ansible can transfer a module to a remote machine in one of two ways:
Pipelining only works with modules written in Python at this time because
Ansible only knows that Python supports this mode of operation. Supporting
pipelining means that whatever format the module payload takes before being
sent over the wire must be executable by Python via stdin.
sent over the wire must be executable by Python through stdin.
.. _flow_args_over_stdin:
Why pass args over stdin?
^^^^^^^^^^^^^^^^^^^^^^^^^
Passing arguments via stdin was chosen for the following reasons:
Passing arguments through stdin was chosen for the following reasons:
* When combined with :ref:`ANSIBLE_PIPELINING`, this keeps the module's arguments from
temporarily being saved onto disk on the remote machine. This makes it
@ -818,7 +818,7 @@ The following are optional arguments for ``AnsibleModule()``:
In this example, if the user specifies ``state=present``, at least one of the options ``path`` and ``content`` must be supplied (or both). To make sure that precisely one can be specified, combine ``required_if`` with ``mutually_exclusive``.
On the other hand, if ``force`` (a boolean parameter) is set to ``true``, ``yes`` etc., both ``force_reason`` and ``force_code`` must be specified.
On the other hand, if ``force`` (a boolean parameter) is set to ``true``, ``yes`` and so on, both ``force_reason`` and ``force_code`` must be specified.
:required_by:

View File

@ -69,13 +69,13 @@ Changing a module or plugin name in the Ansible main repository
===============================================================
You can also rename a module and keep a deprecated alias to the old name by using a symlink that starts with _.
This example allows the ``stat`` module to be called with ``fileinfo``, making the following examples equivalent::
This example allows the ``stat`` module to be called with ``fileinfo``, making the following examples equivalent:
EXAMPLES = '''
.. code-block:: yaml
ln -s stat.py _fileinfo.py
ansible -m stat -a "path=/tmp" localhost
ansible -m fileinfo -a "path=/tmp" localhost
'''
Renaming a module or plugin in a collection, or redirecting a module or plugin to another collection
====================================================================================================

View File

@ -61,7 +61,9 @@ For menu procedures, bold the menu names, button names, and so on to help the us
3. In the **Open** dialog box, click **Save**.
4. On the toolbar, click the **Open File** icon.
For code or command snippets, use the RST `code-block directive <https://www.sphinx-doc.org/en/1.5/markup/code.html#directive-code-block>`_::
For code or command snippets, use the RST `code-block directive <https://www.sphinx-doc.org/en/1.5/markup/code.html#directive-code-block>`_:
.. code-block:: rst
.. code-block:: bash

View File

@ -192,7 +192,9 @@ Adding anchors
* Include at least one anchor on every page
* Place the main anchor above the main header
* If the file has a unique title, use that for the main page anchor::
* If the file has a unique title, use that for the main page anchor:
.. code-block:: text
.. _unique_page::

View File

@ -129,7 +129,9 @@ Create a fresh area to work:
git clone https://github.com/ansible/ansible.git ansible-pr-testing
cd ansible-pr-testing
Next, find the pull request you'd like to test and make note of its number. It will look something like this::
Next, find the pull request you'd like to test and make note of its number. It will look something like this:
.. code-block:: text
Use os.path.sep instead of hardcoding / #65381
@ -204,7 +206,9 @@ More information: :ref:`testing_integration`
Any potential issues should be added as comments on the pull request (and it's acceptable to comment if the feature works as well), remembering to include the output of ``ansible --version``
Example::
Example:
.. code-block:: text
Works for me! Tested on `Ansible 2.3.0`. I verified this on CentOS 6.5 and also Ubuntu 14.04.

View File

@ -8,7 +8,7 @@ comment header:
from __future__ import (absolute_import, division, print_function)
This uses Python 3 semantics for absolute vs relative imports, division, and print. By doing this,
This uses Python 3 semantics for absolute versus relative imports, division, and print. By doing this,
we can write code which is portable between Python 2 and Python 3 by following the Python 3 semantics.

View File

@ -71,7 +71,9 @@ This will be the name of the sanity test.
If the sanity test is specific to a version of Python, the name will include a dash (``-``) and the relevant Python version.
If the named test uses error codes then the error code to ignore must be appended to the name of the test, separated by a colon (``:``).
Below are some example ignore entries for an Ansible collection::
Below are some example ignore entries for an Ansible collection:
.. code-block:: text
roles/my_role/files/my_script.sh shellcheck:SC2154 # ignore undefined variable
plugins/modules/my_module.py validate-modules:missing-gplv3-license # ignore license check
@ -81,7 +83,9 @@ It is also possible to skip a sanity test for a specific file.
This is done by adding ``!skip`` after the sanity test name in the second column.
When this is done, no error code is included, even if the sanity test uses error codes.
Below are some example skip entries for an Ansible collection::
Below are some example skip entries for an Ansible collection:
.. code-block:: text
plugins/module_utils/my_util.py validate-modules!skip # waiting for bug fix in module validator
plugins/lookup/my_plugin.py compile-2.6!skip # Python 2.6 is not supported on the controller

View File

@ -11,4 +11,4 @@ Additionally, the following code is checked against Python versions supported on
* ``lib/ansible/modules/``
* ``lib/ansible/module_utils/``
See https://mypy.readthedocs.io/en/stable/ for additional details.
See `the mypy documentation <https://mypy.readthedocs.io/en/stable/>`_

View File

@ -8,7 +8,7 @@ problems with it are:
a byte string or text string. The programmer has to first check the top of the file to see if the
import is there.
* It removes the ability to define native strings (a string which should be a byte string on python2
and a text string on python3) via a string literal.
and a text string on python3) by a string literal.
* It makes for more context switching. A programmer could be reading one file which has
`unicode_literals` and know that bare string literals are text strings but then switch to another
file (perhaps tracing program execution into a third party library) and have to switch their

View File

@ -31,6 +31,8 @@ To ensure that your module documentation matches your ``argument_spec``:
pip install --user -r test/lib/ansible_test/_data/requirements/sanity.txt
#. run the ``validate-modules`` test::
#. run the ``validate-modules`` test:
.. code-block:: bash
ansible-test sanity --test validate-modules mymodule

View File

@ -122,7 +122,7 @@ and enable PowerShell Remoting to continue.
Running these tests may result in changes to your Windows host, so don't run
them against a production/critical Windows environment.
Enable PowerShell Remoting (run on the Windows host via Remote Desktop):
Enable PowerShell Remoting (run on the Windows host by a Remote Desktop):
.. code-block:: shell-session

View File

@ -85,7 +85,7 @@ has lambda basic execution privileges.
Running Tests
=============
The tests are invoked via a ``Makefile``.
The tests are invoked through the ``Makefile``.
If you haven't already got Ansible available use the local checkout by doing:

View File

@ -13,8 +13,9 @@ PEP 8
Running Locally
===============
The `PEP 8`_ check can be run locally with::
The `PEP 8`_ check can be run locally with:
.. code-block:: shell
ansible-test sanity --test pep8 [file-or-directory-path-to-check] ...

View File

@ -95,7 +95,7 @@ Codes
invalid-examples Documentation Error ``EXAMPLES`` is not valid YAML
invalid-extension Naming Error Official Ansible modules must have a ``.py`` extension for python modules or a ``.ps1`` for powershell modules
invalid-module-schema Documentation Error ``AnsibleModule`` schema validation error
invalid-removal-version Documentation Error The version at which a feature is supposed to be removed cannot be parsed (for collections, it must be a semantic version, see https://semver.org/)
invalid-removal-version Documentation Error The version at which a feature is supposed to be removed cannot be parsed (for collections, it must be a `semantic version <https://semver.org/>`_)
invalid-requires-extension Naming Error Module ``#AnsibleRequires -CSharpUtil`` should not end in .cs, Module ``#Requires`` should not end in .psm1
missing-doc-fragment Documentation Error ``DOCUMENTATION`` fragment missing
missing-existing-doc-fragment Documentation Warning Pre-existing ``DOCUMENTATION`` fragment missing
@ -105,7 +105,6 @@ Codes
missing-module-utils-basic-import Imports Warning Did not find ``ansible.module_utils.basic`` import
missing-module-utils-import-csharp-requirements Imports Error No ``Ansible.ModuleUtils`` or C# Ansible util requirements/imports found
missing-powershell-interpreter Syntax Error Interpreter line is not ``#!powershell``
missing-python-doc Naming Error Missing python documentation file
missing-python-interpreter Syntax Error Interpreter line is not ``#!/usr/bin/python``
missing-return Documentation Error No ``RETURN`` documentation provided
missing-return-legacy Documentation Warning No ``RETURN`` documentation provided for legacy module

View File

@ -394,7 +394,7 @@ This is an example using an extract from a YAML inventory, as the INI format do
...
To use an inline vaulted variables with an INI inventory you need to store it in a 'vars' file in YAML format,
it can reside in host_vars/ or group_vars/ to be automatically picked up or referenced from a play via ``vars_files`` or ``include_vars``.
it can reside in host_vars/ or group_vars/ to be automatically picked up or referenced from a play through ``vars_files`` or ``include_vars``.
To run a playbook with this setup, drop the ``-k`` flag and add a flag for your ``vault-id``:

View File

@ -8,7 +8,7 @@ Ansible collections support a wide range of vendors, device types, and actions,
- Automate repetitive tasks to speed routine network changes and free up your time for more strategic work
- Leverage the same simple, powerful, and agentless automation tool for network tasks that operations and development use
- Separate the data model (in a playbook or role) from the execution layer (via Ansible modules) to manage heterogeneous network devices
- Separate the data model (in a playbook or role) from the execution layer (through Ansible modules) to manage heterogeneous network devices
- Benefit from community and vendor-generated sample playbooks and roles to help accelerate network automation projects
- Communicate securely with network hardware over SSH or HTTPS

View File

@ -87,7 +87,9 @@ From the log notice:
If the log reports the port as ``None`` this means that the default port is being used.
A future Ansible release will improve this message so that the port is always logged.
Because the log files are verbose, you can use grep to look for specific information. For example, once you have identified the ``pid`` from the ``creating new control socket for host`` line you can search for other connection log entries::
Because the log files are verbose, you can use grep to look for specific information. For example, once you have identified the ``pid`` from the ``creating new control socket for host`` line you can search for other connection log entries:
.. code:: shell
grep "p=28990" $ANSIBLE_LOG_PATH
@ -164,7 +166,9 @@ For Ansible this can be done by ensuring you are only running against one remote
* Using ``ansible-playbook --limit switch1.example.net...``
* Using an ad hoc ``ansible`` command
`ad hoc` refers to running Ansible to perform some quick command using ``/usr/bin/ansible``, rather than the orchestration language, which is ``/usr/bin/ansible-playbook``. In this case we can ensure connectivity by attempting to execute a single command on the remote device::
`ad hoc` refers to running Ansible to perform some quick command using ``/usr/bin/ansible``, rather than the orchestration language, which is ``/usr/bin/ansible-playbook``. In this case we can ensure connectivity by attempting to execute a single command on the remote device:
.. code-block:: text
ansible -m arista.eos.eos_command -a 'commands=?' -i inventory switch1.example.net -e 'ansible_connection=ansible.netcommon.network_cli' -u admin -k
@ -322,7 +326,7 @@ Error: "Authentication failed"
**Platforms:** Any
Occurs if the credentials (username, passwords, or ssh keys) passed to ``ansible-connection`` (via ``ansible`` or ``ansible-playbook``) can not be used to connect to the remote device.
Occurs if the credentials (username, passwords, or ssh keys) passed to ``ansible-connection`` (through ``ansible`` or ``ansible-playbook``) can not be used to connect to the remote device.
@ -336,7 +340,7 @@ For example:
Suggestions to resolve:
If you are specifying credentials via ``password:`` (either directly or via ``provider:``) or the environment variable `ANSIBLE_NET_PASSWORD` it is possible that ``paramiko`` (the Python SSH library that Ansible uses) is using ssh keys, and therefore the credentials you are specifying are being ignored. To find out if this is the case, disable "look for keys". This can be done like this:
If you are specifying credentials through ``password:`` (either directly or through ``provider:``) or the environment variable `ANSIBLE_NET_PASSWORD` it is possible that ``paramiko`` (the Python SSH library that Ansible uses) is using ssh keys, and therefore the credentials you are specifying are being ignored. To find out if this is the case, disable "look for keys". This can be done like this:
.. code-block:: yaml
@ -724,9 +728,9 @@ Example Ansible inventory file
ansible_password=!vault...
.. note:: Using ``ProxyCommand`` with passwords via variables
.. note:: Using ``ProxyCommand`` with passwords through variables
By design, SSH doesn't support providing passwords via environment variables.
By design, SSH doesn't support providing passwords through environment variables.
This is done to prevent secrets from leaking out, for example in ``ps`` output.
We recommend using SSH Keys, and if needed an ssh-agent, rather than passwords, where ever possible.

View File

@ -24,7 +24,7 @@ Connections available
accepts ``-u myuser -k`` if using password
Indirect Access via a bastion (jump host)
Indirect Access by a bastion (jump host)
Connection Settings ``ansible_connection: ansible.netcommon.network_cli``
@ -59,7 +59,7 @@ Example CLI ``group_vars/cnos.yml``
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords via environment variables.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
Example CLI task
----------------

View File

@ -24,7 +24,7 @@ Connections available
accepts ``-u myuser -k`` if using password
Indirect Access via a bastion (jump host)
Indirect Access through a bastion (jump host)
Connection Settings ``ansible_connection: ansible.netcommon.network_cli``
@ -60,7 +60,7 @@ Example CLI ``group_vars/dellos10.yml``
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords via environment variables.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
Example CLI task
----------------

View File

@ -24,7 +24,7 @@ Connections available
accepts ``-u myuser -k`` if using password
Indirect Access via a bastion (jump host)
Indirect Access through a bastion (jump host)
Connection Settings ``ansible_connection: ansible.netcommon.network_cli``
@ -59,7 +59,7 @@ Example CLI ``group_vars/dellos6.yml``
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords via environment variables.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
Example CLI task
----------------

View File

@ -24,7 +24,7 @@ Connections available
accepts ``-u myuser -k`` if using password
Indirect Access via a bastion (jump host)
Indirect Access through a bastion (jump host)
Connection Settings ``ansible_connection: ansible.netcommon.network_cli``
@ -59,7 +59,7 @@ Example CLI ``group_vars/dellos9.yml``
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords via environment variables.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
Example CLI task
----------------

View File

@ -24,7 +24,7 @@ Connections available
accepts ``-u myuser -k`` if using password
Indirect Access via a bastion (jump host)
Indirect Access by a bastion (jump host)
Connection Settings ``ansible_connection: ansible.netcommon.network_cli``
@ -61,7 +61,7 @@ Example CLI ``group_vars/enos.yml``
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords via environment variables.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
Example CLI task
----------------

View File

@ -24,7 +24,7 @@ Connections available
present
accepts ``-u myuser -k`` if using password
Indirect Access via a bastion (jump host) via a web proxy
Indirect Access by a bastion (jump host) through a web proxy
Connection Settings ``ansible_connection:`` ``ansible_connection:``
``ansible.netcommon.network_cli`` ``ansible.netcommon.httpapi``
@ -64,7 +64,7 @@ Example CLI ``group_vars/eos.yml``
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords via environment variables.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
Example CLI task
----------------

View File

@ -24,7 +24,7 @@ Connections available
accepts ``-u myuser -k`` if using password
Indirect Access via a bastion (jump host)
Indirect Access by a bastion (jump host)
Connection Settings ``ansible_connection: ansible.netcommon.network_cli``
@ -54,7 +54,7 @@ Example CLI ``group_vars/eric_eccli.yml``
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords via environment variables.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
Example CLI task
----------------

View File

@ -25,7 +25,7 @@ Connections available
accepts ``-u myuser -k`` if using password
Indirect Access via a bastion (jump host) via a web proxy
Indirect Access by a bastion (jump host) through a web proxy
Connection Settings ``ansible_connection:`` ``ansible_connection:``
``ansible.netcommon.network_cli`` ``ansible.netcommon.httpapi``
@ -56,7 +56,7 @@ Example CLI ``group_vars/exos.yml``
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords via environment variables.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
Example CLI task
----------------

View File

@ -24,7 +24,7 @@ Connections available
accepts ``-u myuser -k`` if using password
Indirect Access via a bastion (jump host)
Indirect Access by a bastion (jump host)
Connection Settings ``ansible_connection: ansible.netcommon.network_cli``
@ -53,7 +53,7 @@ Example CLI ``group_vars/frr.yml``
- The ``ansible_user`` should be a part of the ``frrvty`` group and should have the default shell set to ``/bin/vtysh``.
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords via environment variables.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
Example CLI task
----------------

View File

@ -24,7 +24,7 @@ Connections available
accepts ``-u myuser -k`` if using password
Indirect Access via a bastion (jump host)
Indirect Access by a bastion (jump host)
Connection Settings ``ansible_connection: ansible.netcommon.network_cli``
@ -57,7 +57,7 @@ Example CLI ``group_vars/icx.yml``
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords via environment variables.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
Example CLI task
----------------

View File

@ -24,7 +24,7 @@ Connections available
accepts ``-u myuser -k`` if using password
Indirect Access via a bastion (jump host)
Indirect Access by a bastion (jump host)
Connection Settings ``ansible_connection: ansible.netcommon.network_cli``
@ -59,7 +59,7 @@ Example CLI ``group_vars/ios.yml``
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords via environment variables.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
Example CLI task
----------------

View File

@ -28,7 +28,7 @@ Connections available
accepts ``-u myuser -k`` if using password accepts ``-u myuser -k`` if using password
Indirect Access via a bastion (jump host) via a bastion (jump host)
Indirect Access by a bastion (jump host) by a bastion (jump host)
Connection Settings ``ansible_connection:`` ``ansible_connection:``
``ansible.netcommon.network_cli`` ``ansible.netcommon.netconf``
@ -61,7 +61,7 @@ Example CLI inventory ``[iosxr:vars]``
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords via environment variables.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
Example CLI task
----------------

View File

@ -24,7 +24,7 @@ Connections available
accepts ``-u myuser -k`` if using password
Indirect Access via a bastion (jump host)
Indirect Access by a bastion (jump host)
Connection Settings ``ansible_connection: ansible.netcommon.network_cli``
@ -60,7 +60,7 @@ Example CLI ``group_vars/mlx.yml``
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords via environment variables.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
Example CLI task
----------------

View File

@ -27,7 +27,7 @@ Connections available
accepts ``-u myuser -k`` if using password accepts ``-u myuser -k`` if using password
Indirect Access via a bastion (jump host) via a bastion (jump host)
Indirect Access by a bastion (jump host) by a bastion (jump host)
Connection Settings ``ansible_connection: ``ansible_connection:
``ansible.netcommon.network_cli`` ``ansible.netcommon.netconf``
@ -62,7 +62,7 @@ Example CLI inventory ``[junos:vars]``
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords via environment variables.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
Example CLI task
----------------
@ -86,7 +86,7 @@ Before you can use NETCONF to connect to a switch, you must:
- install the ``ncclient`` python package on your control node(s) with ``pip install ncclient``
- enable NETCONF on the Junos OS device(s)
To enable NETCONF on a new switch via Ansible, use the ``junipernetworks.junos.junos_netconf`` module through the CLI connection. Set up your platform-level variables just like in the CLI example above, then run a playbook task like this:
To enable NETCONF on a new switch through Ansible, use the ``junipernetworks.junos.junos_netconf`` module through the CLI connection. Set up your platform-level variables just like in the CLI example above, then run a playbook task like this:
.. code-block:: yaml

View File

@ -26,7 +26,7 @@ Connections available
accepts ``-u myuser -k`` if using password
Indirect Access via a bastion (jump host)
Indirect Access through a bastion (jump host)
Connection Settings ``ansible_connection: ansible.netcommon.netconf``
==================== ==========================================
@ -45,7 +45,7 @@ Before you can use NETCONF to connect to a switch, you must:
- install the ``ncclient`` Python package on your control node(s) with ``pip install ncclient``
- enable NETCONF on the Junos OS device(s)
To enable NETCONF on a new switch via Ansible, use the platform specific module via the CLI connection or set it manually.
To enable NETCONF on a new switch through Ansible, use the platform specific module through the CLI connection or set it manually.
For example set up your platform-level variables just like in the CLI example above, then run a playbook task like this:
.. code-block:: yaml

View File

@ -25,7 +25,7 @@ Connections available
accepts ``-u myuser -k`` if using password
Indirect Access via a bastion (jump host)
Indirect Access by a bastion (jump host)
Connection Settings ``ansible_connection: ansible.netcommon.network_cli``
@ -55,7 +55,7 @@ Example CLI ``group_vars/netvisor.yml``
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords via environment variables.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
Example CLI task
----------------

View File

@ -25,7 +25,7 @@ Connections available
accepts ``-u myuser -k`` if using password
Indirect Access via a bastion (jump host)
Indirect Access by a bastion (jump host)
Connection Settings ``ansible_connection: community.netcommon.network_cli``
@ -55,7 +55,7 @@ Example CLI ``group_vars/nos.yml``
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords via environment variables.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
Example CLI task
----------------

View File

@ -24,7 +24,7 @@ Connections available
present
accepts ``-u myuser -k`` if using password
Indirect Access via a bastion (jump host) via a web proxy
Indirect Access by a bastion (jump host) by a web proxy
Connection Settings ``ansible_connection:`` ``ansible_connection:``
``ansible.netcommon.network_cli`` ``ansible.netcommon.httpapi``
@ -61,7 +61,7 @@ Example CLI ``group_vars/nxos.yml``
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords via environment variables.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
Example CLI task
----------------
@ -82,7 +82,7 @@ Using NX-API in Ansible
Enabling NX-API
---------------
Before you can use NX-API to connect to a switch, you must enable NX-API. To enable NX-API on a new switch via Ansible, use the ``nxos_nxapi`` module via the CLI connection. Set up group_vars/nxos.yml just like in the CLI example above, then run a playbook task like this:
Before you can use NX-API to connect to a switch, you must enable NX-API. To enable NX-API on a new switch through Ansible, use the ``nxos_nxapi`` module through the CLI connection. Set up group_vars/nxos.yml just like in the CLI example above, then run a playbook task like this:
.. code-block:: yaml

View File

@ -25,7 +25,7 @@ Connections available
accepts ``-u myuser -k`` if using password
Indirect Access via a bastion (jump host)
Indirect Access by a bastion (jump host)
Connection Settings ``ansible_connection: ansible.network.network_cli``
@ -59,7 +59,7 @@ Example CLI ``group_vars/routeros.yml``
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords via environment variables.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
- If you are getting timeout errors you may want to add ``+cet1024w`` suffix to your username which will disable console colors, enable "dumb" mode, tell RouterOS not to try detecting terminal capabilities and set terminal width to 1024 columns. See article `Console login process <https://wiki.mikrotik.com/wiki/Manual:Console_login_process>`_ in MikroTik wiki for more information.
Example CLI task

View File

@ -25,7 +25,7 @@ Connections available
accepts ``-u myuser -k`` if using password
Indirect Access via a bastion (jump host)
Indirect Access by a bastion (jump host)
Connection Settings ``ansible_connection: ansible.netcommon.network_cli``
@ -56,7 +56,7 @@ Example CLI ``group_vars/slxos.yml``
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords via environment variables.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
Example CLI task
----------------

View File

@ -25,7 +25,7 @@ Connections available
accepts ``-u myuser -k`` if using password
Indirect Access via a bastion (jump host)
Indirect Access by a bastion (jump host)
Connection Settings ``ansible_connection: ansible.netcommon.network_cli``
@ -59,7 +59,7 @@ Example CLI ``group_vars/voss.yml``
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords via environment variables.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
Example CLI task
----------------

View File

@ -24,7 +24,7 @@ Connections available
accepts ``-u myuser -k`` if using password
Indirect Access via a bastion (jump host)
Indirect Access by a bastion (jump host)
Connection Settings ``ansible_connection: ansible.netcommon.network_cli``
@ -55,7 +55,7 @@ Example CLI ``group_vars/vyos.yml``
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords via environment variables.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
Example CLI task
----------------

View File

@ -25,7 +25,7 @@ Connections available
accepts ``-u myuser -k`` if using password
Indirect Access via a bastion (jump host)
Indirect Access by a bastion (jump host)
Connection Settings ``ansible_connection: community.netcommon.network_cli``
@ -55,7 +55,7 @@ Example CLI ``group_vars/weos4.yml``
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords via environment variables.
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
Example CLI task
----------------

View File

@ -129,7 +129,7 @@ For example, given the inventory
[test:vars]
ansible_connection=ssh
ansible_user=admin
ansible_become=yes
ansible_become=true
ansible_become_user=root
ansible_become_method=sudo
ansible_interpreter_python_fallback=['/usr/local/bin/python', '/usr/local/bin/python3', '/usr/local/bin/python3.8']
@ -213,7 +213,7 @@ You can either ignore it or get rid of it by setting the variable ``ansible_pyth
[test:vars]
ansible_connection=ssh
ansible_user=admin
ansible_become=yes
ansible_become=true
ansible_become_user=root
ansible_become_method=sudo
ansible_interpreter_python_fallback=['/usr/local/bin/python', '/usr/local/bin/python3', '/usr/local/bin/python3.8']

View File

@ -187,7 +187,7 @@ For example:
SourceCredential_username: AdminUser
SourceCredential_password: PasswordForAdminUser
.. Note:: On versions of Ansible older than 2.8, you should set ``no_log: yes``
.. Note:: On versions of Ansible older than 2.8, you should set ``no_log: true``
on the task definition in Ansible to ensure any credentials used are not
stored in any log file or console output.
@ -205,10 +205,10 @@ For example, to define a ``[CimInstance]`` value in Ansible:
# [CimInstance]AuthenticationInfo == MSFT_xWebAuthenticationInformation
AuthenticationInfo:
Anonymous: no
Basic: yes
Digest: no
Windows: yes
Anonymous: false
Basic: true
Digest: false
Windows: true
In the above example, the CIM instance is a representation of the class
`MSFT_xWebAuthenticationInformation <https://github.com/dsccommunity/xWebAdministration/blob/master/source/DSCResources/MSFT_xWebSite/MSFT_xWebSite.schema.mof>`_.
@ -317,7 +317,7 @@ to access the ``HKEY_CURRENT_USER`` hive of the Ansible user:
ValueData: TestData
PsDscRunAsCredential_username: '{{ ansible_user }}'
PsDscRunAsCredential_password: '{{ ansible_password }}'
no_log: yes
no_log: true
Custom DSC Resources
````````````````````
@ -435,7 +435,7 @@ Interact with Azure
ServiceName: ServiceName
StorageAccountName: StorageAccountName
InstanceSize: Medium
Windows: yes
Windows: true
Ensure: Present
Credential_username: '{{ ansible_user }}'
Credential_password: '{{ ansible_password }}'
@ -489,10 +489,10 @@ Setup IIS Website
Port: 8080
IPAddress: '*'
AuthenticationInfo:
Anonymous: no
Basic: yes
Digest: no
Windows: yes
Anonymous: false
Basic: true
Digest: false
Windows: true
.. seealso::

View File

@ -215,8 +215,8 @@ The value for ``ansible_shell_type`` should either be ``cmd`` or ``powershell``.
Use ``cmd`` if the ``DefaultShell`` has not been configured on the SSH service
and ``powershell`` if that has been set as the ``DefaultShell``.
Why is connecting to a Windows host via SSH failing?
````````````````````````````````````````````````````
Why is connecting to a Windows host through SSH failing?
````````````````````````````````````````````````````````
Unless you are using ``Win32-OpenSSH`` as described above, you must connect to
Windows hosts using :ref:`windows_winrm`. If your Ansible output indicates that
SSH was used, either you did not set the connection vars properly or the host is not inheriting them correctly.

View File

@ -48,7 +48,7 @@ to pre-emptively create native images for the assemblies that PowerShell relies
Fix high-CPU-on-boot for VMs/cloud instances
--------------------------------------------
If you are creating golden images to spawn instances from, you can avoid a disruptive
high CPU task near startup via `processing the ngen queue <https://docs.microsoft.com/en-us/dotnet/framework/tools/ngen-exe-native-image-generator#native-image-service>`_
high CPU task near startup through `processing the ngen queue <https://docs.microsoft.com/en-us/dotnet/framework/tools/ngen-exe-native-image-generator#native-image-service>`_
within your golden image creation, if you know the CPU types won't change between
golden image build process and runtime.

View File

@ -495,7 +495,7 @@ Ansible, select one of these installation options:
# main.yml
- name: install Win32-OpenSSH service
hosts: windows
gather_facts: no
gather_facts: false
roles:
- role: jborean93.win_openssh
opt_openssh_setup_service: True

View File

@ -35,12 +35,12 @@ Below are some examples of using all three options to install 7-Zip:
.. code-block:: yaml+jinja
# Install/uninstall with chocolatey
- name: Ensure 7-Zip is installed via Chocolatey
- name: Ensure 7-Zip is installed through Chocolatey
win_chocolatey:
name: 7zip
state: present
- name: Ensure 7-Zip is not installed via Chocolatey
- name: Ensure 7-Zip is not installed through Chocolatey
win_chocolatey:
name: 7zip
state: absent
@ -51,12 +51,12 @@ Below are some examples of using all three options to install 7-Zip:
url: https://www.7-zip.org/a/7z1701-x64.msi
dest: C:\temp\7z.msi
- name: Ensure 7-Zip is installed via win_package
- name: Ensure 7-Zip is installed through win_package
win_package:
path: C:\temp\7z.msi
state: present
- name: Ensure 7-Zip is not installed via win_package
- name: Ensure 7-Zip is not installed through win_package
win_package:
path: C:\temp\7z.msi
state: absent
@ -72,11 +72,11 @@ Below are some examples of using all three options to install 7-Zip:
name: HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{23170F69-40C1-2702-1701-000001000000}
register: 7zip_installed
- name: Ensure 7-Zip is installed via win_command
- name: Ensure 7-Zip is installed through win_command
win_command: C:\Windows\System32\msiexec.exe /i C:\temp\7z.msi /qn /norestart
when: 7zip_installed.exists == false
- name: Ensure 7-Zip is uninstalled via win_command
- name: Ensure 7-Zip is uninstalled through win_command
win_command: C:\Windows\System32\msiexec.exe /x {23170F69-40C1-2702-1701-000001000000} /qn /norestart
when: 7zip_installed.exists == true
@ -161,8 +161,8 @@ access a folder on the same host:
name: '{{ item.name }}'
password: '{{ item.password }}'
groups: LocalGroup
update_password: no
password_never_expires: yes
update_password: false
password_never_expires: true
loop:
- name: User1
password: Password1
@ -185,7 +185,7 @@ access a folder on the same host:
- name: Remove parent inheritance of Development folder
win_acl_inheritance:
path: C:\Development
reorganize: yes
reorganize: true
state: absent
Domain
@ -201,7 +201,7 @@ are created:
name: '{{ item.name }}'
upn: '{{ item.name }}@MY.DOMAIN.COM'
password: '{{ item.password }}'
password_never_expires: no
password_never_expires: false
groups:
- Test User
- Application

View File

@ -341,28 +341,28 @@ Some system dependencies that must be installed prior to using Kerberos. The scr
.. code-block:: shell
# Via Yum (RHEL/Centos/Fedora for the older version)
# Through Yum (RHEL/Centos/Fedora for the older version)
yum -y install gcc python-devel krb5-devel krb5-libs krb5-workstation
# Via DNF (RHEL/Centos/Fedora for the newer version)
# Through DNF (RHEL/Centos/Fedora for the newer version)
dnf -y install gcc python3-devel krb5-devel krb5-libs krb5-workstation
# Via Apt (Ubuntu)
# Through Apt (Ubuntu)
sudo apt-get install python-dev libkrb5-dev krb5-user
# Via Portage (Gentoo)
# Through Portage (Gentoo)
emerge -av app-crypt/mit-krb5
emerge -av dev-python/setuptools
# Via Pkg (FreeBSD)
# Through Pkg (FreeBSD)
sudo pkg install security/krb5
# Via OpenCSW (Solaris)
# Through OpenCSW (Solaris)
pkgadd -d http://get.opencsw.org/now
/opt/csw/bin/pkgutil -U
/opt/csw/bin/pkgutil -y -i libkrb5_3
# Via Pacman (Arch Linux)
# Through Pacman (Arch Linux)
pacman -S krb5
@ -441,7 +441,7 @@ expiration. The temporary credential caches are deleted after each task
completes and will not interfere with the default credential cache.
To disable automatic ticket management, set ``ansible_winrm_kinit_mode=manual``
via the inventory.
through the inventory.
Automatic ticket management requires a standard ``kinit`` binary on the control
host system path. To specify a different location or binary name, set the
@ -678,7 +678,7 @@ When setting up the inventory, the following variables are required:
# ansible-vault edit group_vars/windows.yml
ansible_connection: winrm
# May also be passed on the command-line via --user
# May also be passed on the command-line through --user
ansible_user: Administrator
# May also be supplied at runtime with --ask-pass

View File

@ -41,7 +41,7 @@ All tasks in a block inherit directives applied at the block level. Most of what
when: ansible_facts['distribution'] == 'CentOS'
become: true
become_user: root
ignore_errors: yes
ignore_errors: true
In the example above, the 'when' condition will be evaluated before Ansible runs each of the three tasks in the block. All three tasks also inherit the privilege escalation directives, running as the root user. Finally, ``ignore_errors: yes`` ensures that Ansible continues to execute the playbook even if some of the tasks fail.
@ -153,7 +153,7 @@ You can use blocks with ``flush_handlers`` in a rescue task to ensure that all h
- name: Print a message
ansible.builtin.debug:
msg: 'I execute normally'
changed_when: yes
changed_when: true
notify: run me even after an error
- name: Force a failure

View File

@ -37,14 +37,14 @@ For example:
tasks:
- name: This task will always make changes to the system
ansible.builtin.command: /something/to/run --even-in-check-mode
check_mode: no
check_mode: false
- name: This task will never make changes to the system
ansible.builtin.lineinfile:
line: "important config"
dest: /path/to/myconfig.conf
state: present
check_mode: yes
check_mode: true
register: changes_to_important_config
Running single tasks with ``check_mode: yes`` can be useful for testing Ansible modules, either to test the module itself or to test the conditions under which a module would make changes. You can register variables (see :ref:`playbooks_conditionals`) on these tasks for even more detail on the potential changes.
@ -104,4 +104,4 @@ Because the ``--diff`` option can reveal sensitive information, you can disable
owner: root
group: root
mode: '0600'
diff: no
diff: false

View File

@ -29,7 +29,7 @@ The simplest conditional statement applies to a single task. Create the task, th
ansible.posix.seboolean:
name: mysql_connect_any
state: true
persistent: yes
persistent: true
when: ansible_selinux.status == "enabled"
# all variables can be used directly in conditionals without double curly braces

View File

@ -138,7 +138,7 @@ After Ansible invokes the debugger, you can use the seven :ref:`debugger command
- hosts: test
debugger: on_failed
gather_facts: no
gather_facts: false
vars:
var1: value1
tasks:
@ -253,7 +253,7 @@ Update args command
- hosts: test
strategy: debug
gather_facts: yes
gather_facts: true
vars:
pkg_name: not_exist
tasks:

View File

@ -20,7 +20,7 @@ By default Ansible stops executing tasks on a host when a task fails on that hos
- name: Do not count this as a failure
ansible.builtin.command: /bin/false
ignore_errors: yes
ignore_errors: true
The ``ignore_errors`` directive only works when the task is able to run and returns a value of 'failed'. It does not make Ansible ignore undefined variable errors, connection failures, execution issues (for example, missing packages), or syntax errors.
@ -37,7 +37,7 @@ You can ignore a task failure due to the host instance being 'UNREACHABLE' with
- name: This executes, fails, and the failure is ignored
ansible.builtin.command: /bin/true
ignore_unreachable: yes
ignore_unreachable: true
- name: This executes, fails, and ends the play for this host
ansible.builtin.command: /bin/true
@ -47,14 +47,14 @@ And at the playbook level:
.. code-block:: yaml
- hosts: all
ignore_unreachable: yes
ignore_unreachable: true
tasks:
- name: This executes, fails, and the failure is ignored
ansible.builtin.command: /bin/true
- name: This executes, fails, and ends the play for this host
ansible.builtin.command: /bin/true
ignore_unreachable: no
ignore_unreachable: false
.. _resetting_unreachable:

View File

@ -2106,7 +2106,7 @@ To get a date object from a string use the `to_datetime` filter:
# get amount of days between two dates. This returns only number of days and discards remaining hours, minutes, and seconds
{{ (("2016-08-14 20:00:12" | to_datetime) - ("2015-12-25" | to_datetime('%Y-%m-%d'))).days }}
.. note:: For a full list of format codes for working with python date format strings, see https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior.
.. note:: For a full list of format codes for working with python date format strings, see the `python datetime documentation <https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior>`_.
.. versionadded:: 2.4

View File

@ -116,7 +116,7 @@ Assuming you load balance your checkout location, ``ansible-pull`` scales essent
Run ``ansible-pull --help`` for details.
There's also a `clever playbook <https://github.com/ansible/ansible-examples/blob/master/language_features/ansible_pull.yml>`_ available to configure ``ansible-pull`` via a crontab from push mode.
There's also a `clever playbook <https://github.com/ansible/ansible-examples/blob/master/language_features/ansible_pull.yml>`_ available to configure ``ansible-pull`` through a crontab from push mode.
Verifying playbooks
===================

View File

@ -239,7 +239,7 @@ You can use Jinja2 expressions to iterate over complex lists. For example, a loo
community.mysql.mysql_user:
name: "{{ item[0] }}"
priv: "{{ item[1] }}.*:ALL"
append_privs: yes
append_privs: true
password: "foo"
loop: "{{ ['alice', 'bob'] | product(['clientdb', 'employeedb', 'providerdb']) | list }}"
@ -448,7 +448,7 @@ Variable Description
::
loop_control:
extended: yes
extended: true
.. note:: When using ``loop_control.extended`` more memory will be utilized on the control node. This is a result of ``ansible_loop.allitems`` containing a reference to the full loop data for every loop. When serializing the results for display in callback plugins within the main ansible process, these references may be dereferenced causing memory usage to increase.
@ -459,8 +459,8 @@ To disable the ``ansible_loop.allitems`` item, to reduce memory consumption, set
::
loop_control:
extended: yes
extended_allitems: no
extended: true
extended_allitems: false
Accessing the name of your loop_var
-----------------------------------
@ -468,7 +468,7 @@ Accessing the name of your loop_var
As of Ansible 2.8 you can get the name of the value provided to ``loop_control.loop_var`` using the ``ansible_loop_var`` variable
For role authors, writing roles that allow loops, instead of dictating the required ``loop_var`` value, you can gather the value via the following
For role authors, writing roles that allow loops, instead of dictating the required ``loop_var`` value, you can gather the value through the following
.. code-block:: yaml+jinja

View File

@ -42,7 +42,7 @@ For example, to manage a system service (which requires ``root`` privileges) whe
service:
name: httpd
state: started
become: yes
become: true
To run a command as the ``apache`` user:
@ -50,7 +50,7 @@ To run a command as the ``apache`` user:
- name: Run a command as the apache user
command: somecommand
become: yes
become: true
become_user: apache
To do something as the ``nobody`` user when the shell is nologin:
@ -59,7 +59,7 @@ To do something as the ``nobody`` user when the shell is nologin:
- name: Run a command as nobody
command: somecommand
become: yes
become: true
become_method: su
become_user: nobody
become_flags: '-s /bin/sh'
@ -316,7 +316,7 @@ To set ``enable`` mode for a specific task, add ``become`` at the task level:
arista.eos.eos_facts:
gather_subset:
- "!hardware"
become: yes
become: true
become_method: enable
To set enable mode for all tasks in a single play, add ``become`` at the play level:
@ -324,7 +324,7 @@ To set enable mode for all tasks in a single play, add ``become`` at the play le
.. code-block:: yaml
- hosts: eos-switches
become: yes
become: true
become_method: enable
tasks:
- name: Gather facts (eos)
@ -344,7 +344,7 @@ Often you wish for all tasks in all plays to run using privilege mode, that is b
ansible_connection: ansible.netcommon.network_cli
ansible_network_os: arista.eos.eos
ansible_user: myuser
ansible_become: yes
ansible_become: true
ansible_become_method: enable
Passwords for enable mode
@ -374,7 +374,7 @@ Ansible still supports ``enable`` mode with ``connection: local`` for legacy net
gather_subset:
- "!hardware"
provider:
authorize: yes
authorize: true
auth_pass: " {{ secret_auth_pass }}"
We recommend updating your playbooks to use ``become`` for network-device ``enable`` mode consistently. The use of ``authorize`` and of ``provider`` dictionaries will be deprecated in future. Check the :ref:`platform_options` documentation for details.
@ -423,7 +423,7 @@ task:
- Check my user name
ansible.windows.win_whoami:
become: yes
become: true
The output will look something similar to the below:
@ -725,9 +725,9 @@ Here are some examples of how to use ``become_flags`` with Windows tasks:
ansible.windows.win_copy:
src: \\server\share\data\file.txt
dest: C:\temp\file.txt
remote_src: yes
remote_src: true
vars:
ansible_become: yes
ansible_become: true
ansible_become_method: runas
ansible_become_user: DOMAIN\user
ansible_become_password: Password01
@ -735,12 +735,12 @@ Here are some examples of how to use ``become_flags`` with Windows tasks:
- name: run a command under a batch logon
ansible.windows.win_whoami:
become: yes
become: true
become_flags: logon_type=batch
- name: run a command and not load the user profile
ansible.windows.win_whomai:
become: yes
become: true
become_flags: logon_flags=

View File

@ -19,7 +19,7 @@ Here is a most basic example:
- name: username
prompt: What is your username?
private: no
private: false
- name: password
prompt: What is your password?
@ -56,9 +56,9 @@ You can hash the entered value so you can use it, for instance, with the user mo
- name: my_password2
prompt: Enter password2
private: yes
private: true
encrypt: sha512_crypt
confirm: yes
confirm: true
salt_size: 7
If you have `Passlib <https://passlib.readthedocs.io/en/stable/>`_ installed, you can use any crypt scheme the library supports:
@ -107,8 +107,8 @@ Some special characters, such as ``{`` and ``%`` can create templating errors. I
vars_prompt:
- name: my_password_with_weird_chars
prompt: Enter password
unsafe: yes
private: yes
unsafe: true
private: true
.. seealso::

View File

@ -16,7 +16,7 @@ Dictionary views
================
In Python2, the :meth:`dict.keys`, :meth:`dict.values`, and :meth:`dict.items`
methods return a list. Jinja2 returns that to Ansible via a string
methods return a list. Jinja2 returns that to Ansible using a string
representation that Ansible can turn back into a list.
In Python3, those methods return a :ref:`dictionary view <python3:dict-views>` object. The

View File

@ -17,7 +17,7 @@ Ansible offers four distributed, re-usable artifacts: variables files, task file
- A variables file contains only variables.
- A task file contains only tasks.
- A playbook contains at least one play, and may contain variables, tasks, and other content. You can re-use tightly focused playbooks, but you can only re-use them statically, not dynamically.
- A role contains a set of related tasks, variables, defaults, handlers, and even modules or other plugins in a defined file-tree. Unlike variables files, task files, or playbooks, roles can be easily uploaded and shared via Ansible Galaxy. See :ref:`playbooks_reuse_roles` for details about creating and using roles.
- A role contains a set of related tasks, variables, defaults, handlers, and even modules or other plugins in a defined file-tree. Unlike variables files, task files, or playbooks, roles can be easily uploaded and shared through Ansible Galaxy. See :ref:`playbooks_reuse_roles` for details about creating and using roles.
.. versionadded:: 2.4

View File

@ -324,8 +324,7 @@ role ``meta/argument_specs.yml`` file. All fields are lower-case.
* Ensure that the default value in the docs matches the default value in the code. The actual
default for the role variable will always come from ``defaults/main.yml``.
* The default field must not be listed as part of the description, unless it requires additional information or conditions.
* If the option is a boolean value, you can use any of the boolean values recognized by Ansible:
(such as true/false or yes/no). Choose the one that reads better in the context of the option.
* If the option is a boolean value, you should use `true/false` if you want to be compatible with `ansible-lint`.
:choices:

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