Ansible 4 移植指南

我们建议您阅读此页面以及Ansible 4 更新日志,以了解您可能需要进行的更新。

Playbook

  • jinja2_native 设置现在不影响隐式返回字符串的模板模块。对于模板查找,有一个新的参数 jinja2_native(默认关闭)来控制该功能。其余的 Jinja2 表达式仍然基于 jinja2_native 设置运行。

命令行

  • 删除了 ansible-galaxy login 命令,因为它用于 GitHub 身份验证的底层 API 已被关闭。现在,使用 ansible-galaxy 将角色或集合发布到 Galaxy 需要将 Galaxy API 令牌传递给 CLI,可以使用令牌文件(默认位置 ~/.ansible/galaxy_token)或(不安全地)使用 ansible-galaxy--token 参数。

已弃用

常量 ansible.module_utils.basic._CHECK_ARGUMENT_TYPES_DISPATCHER 已弃用。请改用 ansible.module_utils.common.parameters.DEFAULT_TYPE_VALIDATORS

重大更改

AnsibleModule 的更改

随着向使用 ArgumentSpecValidator 执行参数规范验证的过渡,AnsibleModule 中的以下私有方法已被删除

使用这些私有方法的模块或插件应使用 ansible.module_utils.common.validation 中的公共函数,或者如果没有列出公共函数,则使用 ArgumentSpecValidator.validate()

ansible.module_utils.common.parameters 的更改

ansible.module_utils.common.parameters 中的以下函数现在是私有的,不应直接使用。请改用 ArgumentSpecValidator.validate()

  • list_no_log_values

  • list_deprecations

  • handle_aliases

其他

  • 升级: 如果您从 ansible < 2.10 或从 ansible-base 升级并且使用 pip,您必须在安装 ansible-core 之前 pip uninstall ansiblepip uninstall ansible-base,以避免冲突。

  • 控制器节点上的 Python 3.8 是此版本的软性要求。ansible-core 2.11 仍然可以使用与 ansible-base 2.10 相同的 Python 版本,但是当在 Python 版本低于 3.8 的控制器节点上运行时,2.11 会发出警告。可以通过在您的环境中设置 ANSIBLE_CONTROLLER_PYTHON_WARNING=False 来禁用此警告。ansible-core 2.12 将需要 Python 3.8 或更高版本。

  • 配置系统现在会验证 choices 字段,因此任何违反此字段并且在 2.10 中被忽略的设置都会在 2.11 中导致错误。例如,ANSIBLE_COLLECTIONS_ON_ANSIBLE_VERSION_MISMATCH=0 现在会导致错误(有效选择是 ignorewarnerror)。

  • ansible-galaxy 命令现在使用 resolvelib 来解析依赖项。在大多数情况下,这不应该给用户带来任何明显的差异,除了性能更高之外,但我们在这里注明它以供参考和完整性。

  • 如果您将 Python module_utils 导入到您维护的任何模块中,您现在可以通过将 import 语句包装在 tryif 块中,在模块有效负载构建期间将导入标记为可选。这允许模块使用可能在所有 Ansible 或集合版本中不存在的 module_utils,并在模块运行时执行任意恢复或回退操作。

模块

  • apt_key 模块已明确定义 filedatakeyserverurl 互斥。它们不能再一起使用。

  • meta 模块现在支持用户定义的任务的标签。将任务的标签设置为“always”以保持之前的行为。内部 meta 任务继续始终运行。

移除的模块

以下模块不再存在

  • 没有值得注意的更改

弃用通知

没有值得注意的更改

值得注意的模块更改

  • facts - 在 NetBSD 上,当虚拟化且未在 Xen 上运行时,ansible_virtualization_type 现在会尝试报告比 xen 更准确的结果。

  • facts - 虚拟化事实现在包括 virtualization_tech_guestvirtualization_tech_host 键。这些分别是 guest 所属的虚拟化技术列表,以及 host 提供的虚拟化技术列表。例如,如果您设置一个 host 同时提供 KVM 和 VirtualBox,则这两个值都包含在 virtualization_tech_host 中。同样,在由 KVM 支持的 VM 上运行的 podman 容器的 virtualization_tech_guest["kvm", "podman", "container"]

  • 为了使用多个过滤器,setup 模块中 filter 参数的类型从 string 更改为 list。之前的行为(使用 string)仍然保留并作为单个过滤器工作。

插件

  • inventory plugins - CachePluginAdjudicator.flush() 现在调用底层缓存插件的 flush(),而不是仅删除它所知道的键。Inventory 插件应使用 delete() 来删除任何特定的键。作为用户,这意味着当 inventory 插件调用其 clear_cache() 方法时,事实也可能会从缓存中刷新。为了解决这个问题,用户可以将 inventory 插件配置为使用独立于事实缓存的缓存后端。

  • callback plugins - meta 任务执行现在像任何其他任务一样发送到 v2_playbook_on_task_start。默认情况下,只有显式的 meta 任务才会发送到那里。回调插件可以选择接收内部隐式创建的任务,以便也对这些任务执行操作,如插件开发文档中所述。

  • 现在验证 choices,因此,如果提供的值不匹配,则使用不正确或不完整的 choices 的插件会在 2.11 中发出错误。这有一个简单的修复方法:更新 choices 中的条目以匹配实际情况。

移植自定义脚本

没有值得注意的更改

v4.10.0 的移植指南

重大更改

containers.podman

  • 添加 podman_tag 模块

  • 添加 secrets 驱动和驱动选项支持

已弃用功能

cisco.nxos

  • 已弃用 nxos_snmp_community 模块。

  • 已弃用 nxos_snmp_contact 模块。

  • 已弃用 nxos_snmp_host 模块。

  • 已弃用 nxos_snmp_location 模块。

  • 已弃用 nxos_snmp_traps 模块。

  • 已弃用 nxos_snmp_user 模块。

junipernetworks.junos

  • ‘router_id’ 选项在 junos_ospf_interfaces、junos_ospfv2 和 junos_ospfv3 资源模块中已弃用。

v4.9.0 的移植指南

已知问题

purestorage.flashblade

  • purefb_lag - 响应中的 mac_address 字段未填充。 这将在未来的 FlashBlade 更新中修复。

重大变更

fortinet.fortios

  • 在一些配置模块的示例部分中添加真实用例。

  • 收集模块的当前配置,并将其转换为 playbook。

  • 支持 FortiOS 7.0.1。

  • 支持在具有成员列表的对象上进行成员操作(删除/添加额外成员)。

  • fortios_monitor_factfortios_log_fact 中支持选择器功能。

v4.8.0 的移植指南

重大更改

community.zabbix

  • 所有角色现在通过其完全限定的集合名称引用其他角色和模块,这使得 Ansible 2.10 成为角色支持的最低版本(请参阅 issue 477)。

已弃用功能

community.azure

community.hashi_vault

v4.7.0 的移植指南

重大变更

openvswitch.openvswitch

  • 我们错误地将存储库标记为 2.0.0,由于这不是本意并且无法恢复,因此我们发布 2.0.1 以使社区了解主要版本更新。

已弃用功能

cisco.ios

  • 已弃用 ios_ntp 模块。

cisco.nxos

  • 已弃用 nxos_ntpnxos_ntp_optionsnxos_ntp_auth 模块。

community.vmware

junipernetworks.junos

  • 已弃用 ospfv2 资源模块中的 router_id。

v4.6.0 的移植指南

重大变更

containers.podman

  • 为 pod 添加 systemd 生成

  • 为容器生成 systemd 服务文件

gluster.gluster

已弃用功能

community.grafana

  • grafana_dashboard 查找 - 不再首选提供经过修改的 API 密钥版本。

v4.5.0 的移植指南

重大变更

hetzner.hcloud

  • 引入放置组

ovirt.ovirt

已弃用功能

ansible.netcommon

cisco.ios

  • 已弃用 ios_bgp,赞成使用 ios_bgp_global 和 ios_bgp_address_family。

  • 删除使用提供程序进行 ansible-test 集成作业的测试。 这有助于我们为迁移到 network-ee 集成测试做准备。

junipernetworks.junos

  • 已弃用 ospfv3 资源模块中的 router_id。

v4.4.0 的移植指南

已知问题

dellemc.openmanage

  • idrac_user - 问题 (192043) 模块可能会报错,并显示消息 unable to perform the import or export operation because there are pending attribute changes or a configuration job is in progress。等待作业完成并再次运行该任务。

已弃用功能

cisco.iosxr

  • iosxr_logging 模块已弃用,赞成使用新的 iosxr_logging_global 资源模块,并将于“2023-08-01”之后的版本中删除。

cisco.nxos

  • nxos_logging 模块已弃用,赞成使用新的 nxos_logging_global 资源模块,并将于“2023-08-01”之后的版本中删除。

community.docker

  • docker_container - 新的 command_handling 的默认值 compatibility 已弃用,将在 community.docker 3.0.0 中更改为 correct。 在行为将发生更改的情况下,该模块会发出弃用警告。 请注意,ansible-core 只会输出一次弃用警告,因此,如果较早的任务显示了该警告,则可能有更多任务具有此警告,但未显示该警告(https://github.com/ansible-collections/community.docker/pull/186)。

junipernetworks.junos

  • junos_logging 模块已被弃用,取而代之的是新的 junos_logging_global 资源模块,并将在“2023-08-01”之后的版本中删除。

vyos.vyos

  • vyos_logging 模块已被弃用,取而代之的是新的 vyos_logging_global 资源模块,并将在“2023-08-01”之后的版本中删除。

v4.3.0 的移植指南

主要变更

netapp.cloudmanager

  • 在 cloudmanager 中的所有模块中添加阶段环境

已弃用的功能

community.hashi_vault

v4.2.0 的移植指南

已知问题

dellemc.openmanage

  • idrac_user - 问题 (192043) 模块可能会报错,并显示消息 unable to perform the import or export operation because there are pending attribute changes or a configuration job is in progress。等待作业完成并再次运行该任务。

  • ome_smart_fabric_uplink - 问题 (186024) ome_smart_fabric_uplink 模块不允许创建多个同名上行链路,即使 OpenManage Enterprise Modular 支持这样做。如果使用与现有上行链路相同的名称创建上行链路,则会修改现有的上行链路。

主要变更

community.vmware

dellemc.openmanage

  • idrac_server_config_profile - 添加了通过 HTTP/HTTPS 共享导出和导入服务器配置文件的支持。

  • ome_device_group - 添加了使用设备的 IP 地址和组 ID 将设备添加到组的支持。

fortinet.fortios

  • 新模块 fortios_monitor_fact。

  • 支持 Fortios 7.0。

  • 支持日志 API。

已弃用的功能

  • community.kubernetes 集合正在重命名为 kubernetes.core。在 Ansible 5 中,community.kubernetes 将被一个空集合替换,该集合具有所有当前内容到 kubernetes.core 的已弃用重定向。如果您使用的是以 community.kubernetes. 开头的 FQCN,请立即将其更新为 kubernetes.core.。请注意,kubernetes.core 自 Ansible 3.0.0 以来已包含在 Ansible 中 (https://github.com/ansible-community/community-topics/issues/22)。

ansible.windows

  • win_updates - 弃用了每个过滤更新的 filtered_reason 返回值,而改用 filtered_reasons。这样做是为了显示更新被过滤的所有原因,而不仅仅是第一个原因。

  • win_updates - 弃用了 use_scheduled_task 选项,因为它不再使用。

  • win_updates - 弃用了 whitelistblacklist 选项,而改用 accept_listreject_list,以符合 Ansible 中用于这些类型选项的新标准。

community.general

community.hashi_vault

v4.1.0 的移植指南

已知问题

dellemc.openmanage

  • idrac_user - 问题 (192043) 模块可能会报错,并显示消息 unable to perform the import or export operation because there are pending attribute changes or a configuration job is in progress。等待作业完成并再次运行该任务。

  • ome_smart_fabric_uplink - 问题 (186024) ome_smart_fabric_uplink 模块不允许创建多个同名上行链路,即使 OpenManage Enterprise Modular 支持这样做。如果使用与现有上行链路相同的名称创建上行链路,则会修改现有的上行链路。

主要变更

cloudscale_ch.cloud

  • 添加 custom_image 模块

community.postgresql

dellemc.openmanage

  • ome_firmware_baseline - 模块支持检查模式,并允许修改和删除固件基线。

  • ome_firmware_catalog - 模块支持检查模式,并允许修改和删除固件目录。

fortinet.fortios

  • 改进 fortios_configuration_fact 以便同时使用多个选择器。

  • 在所有基于 configurationAPI 的模块中支持 check_mode

  • 支持过滤事实收集模块 fortios_configuration_factfortios_monitor_fact

  • 支持在 firewall_central_snat_map 中移动策略。

  • 统一监视 API 的架构。

netbox.netbox

  • packages 现在是必需的 Python 包,并通过 Ansible 2.10+ 安装。

已删除的功能

ansible.windows

  • win_reboot - 删除了自 Ansible 2.5 以来没有任何作用的 shutdown_timeoutshutdown_timeout_sec

已弃用的功能

ansible.windows

community.docker

community.general

inspur.sm

  • add_ad_group - 此功能将在 inspur.sm.add_ad_group 3.0.0 中移除,并替换为 inspur.sm.ad_group。

  • add_ldap_group - 此功能将在 inspur.sm.add_ldap_group 3.0.0 中移除,并替换为 inspur.sm.ldap_group。

  • add_user - 此功能将在 inspur.sm.add_user 3.0.0 中移除,并替换为 inspur.sm.user。

  • add_user_group - 此功能将在 inspur.sm.add_user_group 3.0.0 中移除,并替换为 inspur.sm.user_group。

  • del_ad_group - 此功能将在 inspur.sm.del_ad_group 3.0.0 中移除,并替换为 inspur.sm.ad_group。

  • del_ldap_group - 此功能将在 inspur.sm.del_ldap_group 3.0.0 中移除,并替换为 inspur.sm.ldap_group。

  • del_user - 此功能将在 inspur.sm.del_user 3.0.0 中移除,并替换为 inspur.sm.user。

  • del_user_group - 此功能将在 inspur.sm.del_user_group 3.0.0 中移除,并替换为 inspur.sm.user_group。

  • edit_ad_group - 此功能将在 inspur.sm.edit_ad_group 3.0.0 中移除,并替换为 inspur.sm.ad_group。

  • edit_ldap_group - 此功能将在 inspur.sm.edit_ldap_group 3.0.0 中移除,并替换为 inspur.sm.ldap_group。

  • edit_user - 此功能将在 inspur.sm.edit_user 3.0.0 中移除,并替换为 inspur.sm.user。

  • edit_user_group - 此功能将在 inspur.sm.edit_user_group 3.0.0 中移除,并替换为 inspur.sm.user_group。

v4.0.0 的移植指南

已知问题

Ansible-core

  • ansible-test - pylint 健全性测试不再能正确检测非常量的“错误”变量名。有关更多详细信息,请参见 issue 3701

dellemc.openmanage

  • idrac_user - 问题 (192043) 模块可能会报错,并显示消息 unable to perform the import or export operation because there are pending attribute changes or a configuration job is in progress。等待作业完成并再次运行该任务。

  • ome_configuration_compliance_info - 问题 (195592):模块可能会出错,并显示消息 unable to process the request because an error occurred。如果问题仍然存在,请向系统管理员报告。

  • ome_smart_fabric - 问题 (185322):OpenManage Enterprise Modular 仅支持三种设计类型,但当设计类型不受支持时,该模块仍会成功创建结构。

  • ome_smart_fabric_uplink - 问题 (186024) ome_smart_fabric_uplink 模块不允许创建多个同名上行链路,即使 OpenManage Enterprise Modular 支持这样做。如果使用与现有上行链路相同的名称创建上行链路,则会修改现有的上行链路。

fortinet.fortios

  • 用于监控 API 的模块尚未版本化。

重大更改

Ansible-core

  • 已使 SCM 集合无论是否存在 --force 都重新安装。

  • NetBSD 虚拟化事实(特别是 ansible_virtualization_type)现在通过检查 machdep.hypervisor sysctl 键的值来返回更准确的值。此更改具有破坏性,因为在某些情况下,即使目标不是在 Xen 上运行,我们也会错误地报告 xen。在大多数情况下,此更改可防止出现这种情况。( https://github.com/ansible/ansible/issues/69352 )

  • 已将内部依赖关系解析器替换为 pip >= 20.3 现在默认使用的外部实现 — resolvelib。( https://github.com/ansible/ansible/issues/71784 )

  • meta 模块现在支持用户定义的任务标签。内部 meta 任务继续始终运行。( https://github.com/ansible/ansible/issues/64558 )

  • ansible-galaxy login 命令已删除(请参见 issue 71560

ansible.netcommon

community.docker

  • docker_swarm - 如果指定了 join_token,则具有相同值的返回加入令牌将替换为 VALUE_SPECIFIED_IN_NO_LOG_PARAMETER。请确保在指定了 join_token 的情况下调用模块时,不要盲目使用此模块的返回值中的加入令牌!由于需要修复安全问题,此重大更改出现在次要版本中(https://github.com/ansible-collections/community.docker/pull/103)。

community.general

  • 如果您使用 Ansible 2.9 和此集合中的这些插件或模块,则在尝试按 FQCN 使用 DellEMC 内容(例如 community.general.idrac_firmware)时,community.general 3.0.0 会导致错误。由于 Ansible 2.9 无法使用重定向,您必须手动调整您的剧本和角色,以使用新的 FQCN(对于前面的示例,为 dellemc.openmanage.idrac_firmware),并确保您已安装 dellemc.openmanage

    如果您使用 ansible-base 2.10 或更新版本,但没有安装 Ansible 4.0.0,而是手动安装(和/或升级)了 community.general,则如果您使用这些插件或模块中的任何一个,则需要确保同时安装 dellemc.openmanage 集合。虽然 ansible-base 2.10 或更新版本可以使用 community.general 3.0.0 添加的重定向,但必须安装它们指向的集合(例如 dellemc.openmanage)才能使它们正常工作。

  • gitlab_deploy_key - 如果对于已存在的密钥标题,提供了不同的公钥作为参数,则不会发生任何情况,现在已更改,以便将公钥更新为新值 (https://github.com/ansible-collections/community.general/pull/1661)。

  • java_keystore - 如果别名(名称)更改,现在会覆盖密钥库,而不是失败。这最初是预期行为,但由于逻辑错误而无法正常工作。请确保您的剧本和角色不依赖于旧的失败行为,而是依赖于覆盖行为 (https://github.com/ansible-collections/community.general/issues/1671)。

  • java_keystore - 如果密码短语更改,现在会覆盖密钥库,而不是失败。请确保您的剧本和角色不依赖于旧的失败行为,而是依赖于覆盖行为 (https://github.com/ansible-collections/community.general/issues/1671)。

  • one_image - 使用 pyone 而不是 python-oca (https://github.com/ansible-collections/community.general/pull/2032)。

  • utm_proxy_auth_profile - frontend_cookie_secret 返回值现在包含一个占位符字符串,而不是模块的 frontend_cookie_secret 参数 (https://github.com/ansible-collections/community.general/pull/1736)。

fortinet.fortios

  • 通用 FortiOS 模块 - 用于使用 Ansible 发出通用请求的 FOS 模块。

  • 支持 FOS 监控 API - 监控 API 的几个模块是新的。

  • 统一集合 - fortios 集合本身将适应任何 FOS 平台。

servicenow.servicenow

  • auth 字段现在对于除基本身份验证之外的任何内容都是必需的

theforeman.foreman

  • 所有角色变量现在都以 foreman_ 为前缀,以避免与此集合之外的角色中类似命名的变量发生冲突。

主要变更

Ansible-core

  • 可以使用新的版本要求重新安装集合,而无需使用 --force 标志。如果需要,集合的依赖项也将使用新的要求进行更新。使用 --upgrade 来强制执行传递依赖项更新。

  • AnsibleModule - 使用 ArgumentSpecValidator 类来验证参数规范,并删除与参数规范验证相关的私有方法。任何使用私有方法的模块现在都应使用 ArgumentSpecValidator 类或相应的验证函数。

  • 已将 resolvelib >= 0.5.3, < 0.6.0 声明为 ansible-core 的直接依赖项。参考:- https://github.com/sarugaku/resolvelib - https://pypi.ac.cn/p/resolvelib - https://pradyunsg.me/blog/2020/03/27/pip-resolver-testing

  • 现在可以从本地文件夹和命名空间文件夹安装 Ansible 集合,类似于具有多个集合的 SCM 结构。

  • 现在可以使用 ansible-galaxy collection install 命令的 --upgrade 选项从 Galaxy 服务器升级 Ansible 集合。

  • 支持在角色执行时进行角色参数规范验证。当角色包含参数规范时,会在角色执行开始时插入一个隐式的验证任务。

  • 添加 ArgumentSpecValidator 类,用于在 AnsibleModule 之外针对参数规范验证参数 (https://github.com/ansible/ansible/pull/73335)

  • ansible-test - 当使用 Python 2.6 时,使用 centos6default 测试容器运行的测试现在使用 PyPI 代理容器来访问 PyPI。这允许在 Python 2.6 下运行的测试继续运行,即使 PyPI 正在停止对不支持 SNI 的客户端的支持。

ansible.netcommon

  • 从 netconf_config 中删除已弃用的连接参数

arista.eos

  • 需要 ansible.netcommon v2.0.0+ 来支持 ansible_network_single_user_modeansible_network_import_modules - 有关更多详细信息,请参阅 ansible.netcommon 更新日志

cisco.asa

  • 有关更多详细信息,请参阅 ansible.netcommon 更新日志 <https://github.com/ansible-collections/ansible.netcommon/blob/main/changelogs/CHANGELOG.rst#ansible-netcommon-collection-release-notes>

  • 需要 ansible.netcommon v2.0.0+ 来支持 ansible_network_single_user_modeansible_network_import_modules

cisco.ios

  • 有关更多详细信息,请参阅 ansible.netcommon 更新日志

  • 需要 ansible.netcommon v2.0.0+ 来支持 ansible_network_single_user_modeansible_network_import_modules

cisco.iosxr

  • 有关更多详细信息,请参阅 ansible.netcommon 更新日志

  • 需要 ansible.netcommon v2.0.0+ 来支持 ansible_network_single_user_modeansible_network_import_modules

  • ipaddress 不再在 ansible.netcommon 中。 对于没有 ipaddress 的 Python 版本(< 3.0),现在需要 ipaddress 包。

cisco.nxos

  • 有关更多详细信息,请参阅 ansible.netcommon 更新日志

  • 需要 ansible.netcommon v2.0.0+ 来支持 ansible_network_single_user_modeansible_network_import_modules

community.grafana

  • 在 grafana_teams 和 grafana_folder 模块中引入 “skip_version_check” 参数 (#147)

community.mysql

fortinet.fortios

  • 新模块 fortios_configuration_fact

  • 新模块 fortios_json_generic

  • 新模块 fortios_monitor

  • 新模块 fortios_monitor_fact

junipernetworks.junos

  • 有关更多详细信息,请参阅 ansible.netcommon 更新日志

  • 需要 ansible.netcommon v2.0.0+ 来支持 ansible_network_single_user_modeansible_network_import_modules

netapp.ontap

  • na_ontap_autosupport - 为模块添加 REST 支持。

openvswitch.openvswitch

  • 此特定版本没有重大更改,它是由于错误而被标记的,无法撤消。

servicenow.servicenow

  • 重构客户端以继承自 AnsibleModule

  • 支持 OpenID Connect 身份验证协议

  • 支持用于身份验证的持有者令牌

vyos.vyos

  • 有关更多详细信息,请参阅 ansible.netcommon 更新日志

  • 需要 ansible.netcommon v2.0.0+ 来支持 ansible_network_single_user_modeansible_network_import_modules

  • ipaddress 不再在 ansible.netcommon 中。 对于没有 ipaddress 的 Python 版本(< 3.0),现在需要 ipaddress 包。

已删除的功能

Ansible-core

  • 从 ansible.plugins.strategy 中删除了 SharedPluginLoaderObj 类。它已被弃用,建议使用标准插件加载器。

  • 从回调插件基类中删除了 _get_item() 别名,该别名已被弃用,建议使用 _get_item_label()

  • “user” 参数先前已被弃用,现在已删除,建议使用 “scope”。

  • 已删除已弃用的 ansible.constants.BECOME_METHODS

  • 已删除已弃用的 ansible.constants.get_config()

  • 已删除已弃用的 ansible.constants.mk_boolean()

  • with_* 循环不再针对其 name 参数可以接受列表的模块(主要是包管理器)进行优化。请使用 name,而不是使用 with_items 和其他类似方法循环遍历各个名称。

community.general

community.network

f5networks.f5_modules

fortinet.fortios

  • 移除了模块 fortios_facts

  • 移除了模块 fortios_registration_forticare

  • 移除了模块 fortios_registration_vdom

  • 移除了模块 fortios_system_config_backup_restore

  • 移除了模块 fortios_system_vmlicense

已弃用的功能

Ansible-core

  • 从 2.14 版本开始,shell 和 command 模块将不再具有警告并建议使用其他模块来代替命令的选项。这些模块的 warn 参数现已弃用,默认为 False。同样,COMMAND_WARNINGS 配置选项也已弃用,默认为 False。这些将在 2.14 版本中被移除,并且它们的存在将变为错误。

  • apt_key - 参数 key 没有任何效果,已被弃用,将在 ansible-core 版本 2.14 中移除 (https://github.com/ansible/ansible/pull/70319)。

  • psrp - 将 pypsrp 的最低版本设置为 0.4.0

ansible.netcommon

cisco.nxos

  • 已弃用 nxos_bgp_af,建议使用 nxos_bgp_address_family 资源模块。

  • 已弃用 nxos_bgp_neighbor_af,建议使用 nxos_bgp_neighbor_address_family 资源模块。

cloudscale_ch.cloud

  • volume 模块中 servers 参数的别名 server_uuidsserver_uuid 将在 3.0.0 版本中移除。

community.aws

community.crypto

community.general

community.vmware

f5networks.f5_modules

  • 正在弃用对早于 3.5 的 Python 版本的支持