Open2

ansible-core 2.18 / ansible 11 関連メモ

akira 6592akira 6592

ansible-core 2.18 基本情報

ansible-core 2.18 document

https://docs.ansible.com/ansible-core/2.18/index.html

ansible-core 2.18 ロードマップ

https://docs.ansible.com/ansible-core/2.18/roadmap/ROADMAP_2_18.html

ansible-core 2.18 Porting Guide

https://docs.ansible.com/ansible-core/2.18/porting_guides/porting_guide_core_2.18.html

コントロールノードで Python 3.11 以上が必要に。

Python 3.10 is a no longer supported control node version. Python 3.11+ is now required for running Ansible.

マネージドノードで Python 3.8 以上が必要に。

Python 3.7 is a no longer supported remote version. Python 3.8+ is now required for target execution.

対応表

https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-core-support-matrix

Windows への ssh サポート

The ssh connection plugin now officially supports targeting Windows hosts.

ansible-core 2.18 changelog

https://github.com/ansible/ansible/blob/stable-2.18/changelogs/CHANGELOG-v2.18.rst#v2-18-0

meta モジュールに end_role キーワード追加

Add a new meta task end_role (#22286)

ansible-doc でロールの example を表示可能に

ansible-doc - show examples in role entrypoint argument specs (#82671).

loop_controlbreak_when

loop_control - add a break_when option to to break out of a task loop early based on Jinja2 expressions (#83442).

関連PR https://github.com/ansible/ansible/pull/62151

    - debug: var=item
      changed_when: false
      loop:
        - 1
        - 2
        - 3
        - 4
      loop_control:
        break_when: item >= 2
      register: untiltest

ドキュメント https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_loops.html#breaking-out-of-a-loop

vars に直接リストで定義する方法の削除

Removed support for setting the vars keyword to lists of dictionaries. It is now required to be a single dictionary.

参考(2.15 から警告だった書き方) https://tekunabe.hatenablog.jp/entry/2023/04/18/101049