Ansible 5 移植指南
Ansible 5 基于 Ansible-core 2.12。
我们建议您阅读此页面以及 Ansible 5 更新日志,以了解您可能需要进行的更新。
Playbook
在调用任务并设置
async
时,在environment:
下设置ANSIBLE_ASYNC_DIR
不再有效。 请改用 shell 配置变量async_dir
,例如通过设置ansible_async_dir
tasks:
- dnf:
name: '*'
state: latest
async: 300
poll: 5
vars:
ansible_async_dir: /path/to/my/custom/dir
undef()
函数被添加到模板环境中,用于直接在模板中创建未定义的变量。 可选地,可以为打算被覆盖的变量提供提示。
vars:
old: "{{ undef }}"
new: "{{ undef() }}"
new_with_hint: "{{ undef(hint='You must override this variable') }}"
Python 解释器发现
INTERPRETER_PYTHON
的默认值已更改为 auto
。INTERPRETER_PYTHON_FALLBACK
中的 Python 解释器列表已更改为优先使用 Python 3 而不是 Python 2。 这两个更改的结合意味着新的默认行为是在远程主机上静默地优先使用 Python 3 而不是 Python 2。 以前,在解释器发现会使用 Python 3 但解释器设置为 /usr/bin/python
的情况下,会发出弃用警告。
可以通过设置 ansible_interpreter_python_fallback
变量来更改 INTERPRETER_PYTHON_FALLBACK
的默认解释器列表。
有关更多详细信息,请参阅 解释器发现文档。
命令行
此版本对控制器节点有 Python 3.8 的硬性要求。 命令行脚本将无法在较低版本的 Python 上运行。
ansible-vault
不再支持PyCrypto
,并且需要cryptography
。
已弃用
此版本中,目标节点上的 Python 2.6 已被弃用。
ansible-core
2.13 将删除对 Python 2.6 的支持。条件语句中的裸变量:
when
条件语句不再自动将字符串布尔值(例如"true"
和"false"
)解析为实际的布尔值。 任何包含非空字符串的变量都被视为 true。 这之前可以使用CONDITIONAL_BARE_VARS
配置选项(以及ANSIBLE_CONDITIONAL_BARE_VARS
环境变量)进行配置。 此设置不再起任何作用。 用户可以使用|bool
过滤器来解决此问题
vars:
teardown: 'false'
tasks:
- include_tasks: teardown.yml
when: teardown | bool
- include_tasks: provision.yml
when: not teardown | bool
ActionBase
中的_remote_checksum()
方法已弃用。任何使用此方法的操作插件都应改用_execute_remote_stat()
。
模块
cron
现在要求在所有情况下都指定name
。cron
不再允许reboot
参数。请改用special_time: reboot
。hostname
- 在 FreeBSD 上,如果永久主机名文件不存在,before
结果将不再是"temporarystub"
。为了与其他系统保持一致,它将是""
(空字符串)。hostname
- 在基于 OpenRC 和 Solaris 的系统上,如果永久主机名文件不存在,before
结果将不再是"UNKNOWN"
。为了与其他系统保持一致,它将是""
(空字符串)。pip
现在使用为 Ansible 模块的 Python 解释器安装的pip
Python 模块(如果可用),除非指定了executable
或virtualenv
。
已移除的模块
以下模块不再存在
无明显变化
弃用通知
无明显变化
值得注意的模块更改
无明显变化
插件
Jinja2 < 2.10 的
unique
过滤器区分大小写,如果case_sensitive=False
,现在会一致地引发错误,而不是在case_sensitive=True
时引发错误。集合论过滤器(
intersect
、difference
、symmetric_difference
和union
)现在是区分大小写的。显式使用case_sensitive=False
来保持之前的行为。注意:在 Jinja2 < 2.10 的版本中,这些过滤器默认已经是区分大小写的。password_hash
现在在未指定选项时使用passlib
默认值,例如bcrypt_sha256
,现在默认为“2b”格式,如果需要“2a”格式,则必须显式指定。
移植自定义脚本
无明显变化
网络
无明显变化
v5.9.0 版本的移植指南
新增集合
cisco.dnac (版本 6.4.0)
community.sap_libs (版本 1.1.0)
重大变更
fortinet.fortios
支持 FortiOS 7.0.2、7.0.3、7.0.4、7.0.5。
已弃用功能
集合
community.sap
已重命名为community.sap_libs
。目前,Ansible 中包含这两个集合。community.sap
中的内容将在 Ansible 7.0.0 中被替换为指向新集合的已弃用重定向,这些重定向最终将从 Ansible 中移除。请更新您的community.sap
的 FQCN。
community.docker
对 Ansible 2.9 和 ansible-base 2.10 的支持已弃用,将在下一个主要版本 (community.docker 3.0.0) 中移除。一些模块可能在之后仍然可以使用这些版本,但我们将不再保留支持它们所需的兼容性代码 (https://github.com/ansible-collections/community.docker/pull/361)。
对执行环境的 docker-compose 依赖已弃用,将在 community.docker 3.0.0 中移除。Python docker-compose 库 缺乏维护,可能会导致依赖问题。您仍然可以在需要时手动将其安装到执行环境中 (https://github.com/ansible-collections/community.docker/pull/373)。
各种模块 - 本应在 community.docker 2.0.0 中删除的
tls_hostname
的默认值现在将在版本 3.0.0 中删除 (https://github.com/ansible-collections/community.docker/pull/362)。docker_stack - 本应在 community.docker 2.0.0 中删除的返回值
out
和err
现在将在版本 3.0.0 中删除 (https://github.com/ansible-collections/community.docker/pull/362)。
v5.8.0 版本的移植指南
新增集合
vmware.vmware_rest (版本 2.1.5)
重大变更
vmware.vmware_rest
vmware_rest 2.0.0 支持 vSphere 7.0.2 及更高版本。
vcenter_vm_storage_policy -
disks
参数的格式已更改。vcenter_vm_storage_policy - 该模块有一个新的强制参数:
vm_home
。
重大变更
community.mysql
community.mysql 集合不再支持
Ansible 2.9
和ansible-base 2.10
。虽然我们不采取积极措施来阻止使用,并且没有计划在模块中引入不兼容的代码,但我们将停止针对Ansible 2.9
和ansible-base 2.10
进行测试。两者都将很快到达生命周期尽头,如果您仍在使用它们,应考虑尽快升级到最新的 Ansible / ansible-core 2.11 或更高版本
(https://github.com/ansible-collections/community.mysql/pull/343)。
community.postgresql
community.postgresql 集合不再支持
Ansible 2.9
和ansible-base 2.10
。虽然我们不采取积极措施来阻止使用,并且没有计划在模块中引入不兼容的代码,但我们将停止针对Ansible 2.9
和ansible-base 2.10
进行测试。两者都将很快到达生命周期尽头,如果您仍在使用它们,应考虑尽快升级到最新的 Ansible / ansible-core 2.11 或更高版本
(https://github.com/ansible-collections/community.postgresql/pull/245)。
已弃用功能
community.hashi_vault
token_validate 选项 - 共享的身份验证选项
token_validate
将在 community.hashi_vault 版本 4.0.0 中将其默认值从True
更改为False
。vault_login
查找和模块将保留True
的默认值 (https://github.com/ansible-collections/community.hashi_vault/issues/248)。
community.network
对 Ansible 2.9 和 ansible-base 2.10 的支持已弃用,将在今年春天的下一个主要版本 (community.network 4.0.0) 中移除。虽然大多数内容可能仍然可以在 ansible-base 2.10 上工作,但我们将删除模块和操作插件的符号链接,这将使得它们无法再与 Ansible 2.9 一起使用。请将 community.network 3.x.y 与 Ansible 2.9 和 ansible-base 2.10 一起使用,因为即使它们达到生命周期尽头,这些版本也将继续支持 Ansible 2.9 和 ansible-base 2.10 (https://github.com/ansible-community/community-topics/issues/50, https://github.com/ansible-collections/community.network/pull/382)。
vmware.vmware_rest
vcenter_vm_storage_policy_compliance - 删除该模块,它返回 404 错误。
vcenter_vm_tools - 删除
upgrade
状态。vcenter_vm_tools_installer - 从集合中删除该模块。
v5.7.0 版本的移植指南
重大变更
community.postgresql
postgresql_user -
priv
参数已弃用,将在community.postgresql 3.0.0
中删除。请改用postgresql_privs
模块来授予/撤销权限 (https://github.com/ansible-collections/community.postgresql/issues/212)。
fortinet.fortios
支持 FortiOS 7.0.2、7.0.3、7.0.4、7.0.5。
已弃用功能
community.general
nmcli - 弃用桥的默认 hairpin 模式。这样我们就可以在 community.general 7.0.0 中将其更改为
false
,因为这也是nmcli
中的默认值 (https://github.com/ansible-collections/community.general/pull/4334)。proxmox inventory 插件 -
want_proxmox_nodes_ansible_host
选项当前的默认值true
已被弃用。默认值将在 community.general 6.0.0 中更改为false
。要保持当前的行为,请在你的清单配置中显式地将want_proxmox_nodes_ansible_host
设置为true
。我们建议您通过显式地将其设置为false
,并使用compose:
将ansible_host
设置为正确的值,来切换到新的行为。有关详细信息,请参阅插件文档中的示例 (https://github.com/ansible-collections/community.general/pull/4466)。
v5.6.0 的移植指南
新增集合
community.sap (版本 1.0.0)
已弃用的功能
cisco.ios
弃用 lldp 模块。
v5.5.0 的移植指南
已知问题
community.general
pacman -
update_cache
无法区分最新的和过时的软件包列表,并且在这两种情况下都会报告changed
(https://github.com/ansible-collections/community.general/pull/4318)。pacman -
executable
参数中指定的二进制文件必须支持--print-format
才能被此模块使用。特别是,已知 AUR 助手yay
目前不支持此功能 (https://github.com/ansible-collections/community.general/pull/4312)。
已弃用的功能
community.general
pacman - 从 community.general 5.0.0 开始,如果指定了
name
或upgrade
,则不再忽略update_cache
的changed
状态。要保持旧的行为,请向你的任务添加类似register: result
和changed_when: result.packages | length > 0
的代码 (https://github.com/ansible-collections/community.general/pull/4329)。
v5.4.0 的移植指南
重大更改
chocolatey.chocolatey
win_chocolatey - 添加了 choco_args 选项,以将其他参数直接传递给 Chocolatey。
vyos.vyos
将 'pool' 作为 ntp_global 中 server 键的值添加。
已弃用的功能
cisco.ios
ios_acls - 弃用了 fragment 属性,添加了布尔值备选项作为 enable_fragment。
v5.3.0 的移植指南
重大更改
f5networks.f5_modules
bigip_device_info - 还添加了分页逻辑,以帮助提高 API 的稳定性。
bigip_device_info - 该模块不再从设备上的所有分区收集信息。此更改将通过仅从给定的分区收集资源来稳定模块,并防止模块收集过多信息而可能导致崩溃。
已弃用的功能
community.general
邮件回调插件 - 不指定
sender
已被弃用,并且在 community.general 6.0.0 中将不允许使用 (https://github.com/ansible-collections/community.general/pull/4140)。
v5.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_application_alerts_smtp - 问题 (212310) - 如果 destination_address 超过 255 个字符,该模块不会提供正确的错误消息。
ome_application_alerts_syslog - 问题 (215374) - 如果 destination_address 超过 255 个字符,该模块不会提供正确的错误消息。
ome_device_local_access_configuration - 问题 (215035) - 如果为参数 timeout_limit 提供了不支持的值,该模块会报告
Successfully updated the local access setting
。但是,此值实际上并未应用于 OpenManage Enterprise Modular。ome_device_local_access_configuration - 问题 (217865) - 如果为 user_defined 和 lcd_language 参数提供了不支持的值,该模块不会显示正确的错误消息。
ome_device_network_services - 问题 (212681) - 如果为参数 port_number、community_name、max_sessions、max_auth_retries 和 idle_timeout 提供了不支持的值,该模块不会提供正确的错误消息。
ome_device_power_settings - 问题 (212679) - 如果为参数
power_cap
提供的值不在 0 到 32767 的支持范围内,则该模块会报错,并显示以下消息Unable to complete the request because PowerCap does not exist or is not applicable for the resource URI.
ome_smart_fabric_uplink - 问题 (186024) - 该模块不允许创建多个同名的上行链路,即使 OpenManage Enterprise Modular 支持此功能。如果创建的上行链路与现有上行链路的名称相同,则会修改现有上行链路。
purestorage.flasharray
purefa_admin - 一旦设置了 max_login 和 lockout,目前除了通过 FlashArray GUI 外,没有其他方法将这些值重置为零。
重大更改
cisco.meraki
meraki_mr_radio - 新模块
已弃用的功能
purestorage.flasharray
purefa_sso - 已弃用,推荐使用 M(purefa_admin)。将在 Collection 2.0 中删除
v5.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_application_alerts_smtp - 问题 (212310) - 如果 destination_address 超过 255 个字符,该模块不会提供正确的错误消息。
ome_application_alerts_syslog - 问题 (215374) - 如果 destination_address 超过 255 个字符,该模块不会提供正确的错误消息。
ome_device_network_services - 问题 (212681) - 如果为参数 port_number、community_name、max_sessions、max_auth_retries 和 idle_timeout 提供了不支持的值,该模块不会提供正确的错误消息。
ome_device_power_settings - 问题 (212679) - 如果为参数
power_cap
提供的值不在 0 到 32767 的支持范围内,则该模块会报错,并显示以下消息Unable to complete the request because PowerCap does not exist or is not applicable for the resource URI.
ome_smart_fabric_uplink - 问题 (186024) - 该模块不允许创建多个同名的上行链路,即使 OpenManage Enterprise Modular 支持此功能。如果创建的上行链路与现有上行链路的名称相同,则会修改现有上行链路。
重大更改
containers.podman
添加 podman_tag 模块
添加 secrets 驱动程序和驱动程序选项支持
已删除的功能
community.hashi_vault
“旧版”集成测试设置已被删除;这不影响最终用户,仅与贡献者相关 (https://github.com/ansible-collections/community.hashi_vault/pull/191)。
已弃用的功能
cisco.nxos
弃用 nxos_snmp_community 模块。
弃用 nxos_snmp_contact 模块。
弃用 nxos_snmp_host 模块。
弃用 nxos_snmp_location 模块。
弃用 nxos_snmp_traps 模块。
弃用 nxos_snmp_user 模块。
community.general
module_helper 模块工具 - 弃用了属性
ModuleHelper.VarDict
(https://github.com/ansible-collections/community.general/pull/3801)。
community.hashi_vault
对 Ansible 2.9 和 ansible-base 2.10 的支持已弃用,将在下一个主要版本 (community.hashi_vault 3.0.0) 明年春天删除 (https://github.com/ansible-community/community-topics/issues/50, https://github.com/ansible-collections/community.hashi_vault/issues/189)。
aws_iam_login 身份验证方法 -
aws_iam_login
方法已重命名为aws_iam
。旧名称将在集合版本3.0.0
中删除。在此之前,两个名称都将有效,并且在使用旧名称时会显示警告 (https://github.com/ansible-collections/community.hashi_vault/pull/193)。
junipernetworks.junos
‘router_id’ 选项已从 junos_ospf_interfaces、junos_ospfv2 和 junos_ospfv3 资源模块中弃用。
v5.0.1 的移植指南
重大更改
将 ansible 包的 Python 要求从 >=2.7 提高到 >=3.8,以匹配 ansible-core
v5.0.0 的移植指南
新增集合
cisco.ise (版本 1.2.1)
cloud.common (版本 2.1.0)
community.ciscosmb (版本 1.0.4)
community.dns (版本 2.0.3)
infoblox.nios_modules (版本 1.1.2)
netapp.storagegrid (版本 21.7.0)
已知问题
Ansible-core
ansible-test - 在命令末尾以外的任何位置使用新的复合选项进行 Tab 补全将提供不正确的结果。有关更多详细信息,请参阅问题 351。
dellemc.openmanage
idrac_user - 问题 (192043) 模块可能会报错,提示消息
无法执行导入或导出操作,因为存在待处理的属性更改或配置作业正在进行中
。请等待作业完成并再次运行该任务。ome_device_power_settings - 问题 (212679) 如果为参数
power_cap
提供的值不在 0 到 32767 的支持范围内,ome_device_power_settings 模块会报错,提示以下消息:无法完成请求,因为 PowerCap 不存在或不适用于资源 URI。
ome_smart_fabric_uplink - 问题 (186024) ome_smart_fabric_uplink 模块不允许创建多个同名上行链路,即使 OpenManage Enterprise Modular 支持此操作。如果使用与现有上行链路相同的名称创建上行链路,则会修改现有上行链路。
ome_smart_fabric_uplink - 问题 (186024) ome_smart_fabric_uplink 模块不允许创建多个同名上行链路,即使 OpenManage Enterprise Modular 支持此操作。如果使用与现有上行链路相同的名称创建上行链路,则会修改现有上行链路。
purestorage.flashblade
purefb_lag - 响应中的 mac_address 字段未填充。此问题将在未来的 FlashBlade 更新中修复。
重大变更
Ansible-core
module_defaults 中的操作、模块和组名称必须是静态值。它们的值仍然可以是模板。
完全限定的“ansible.legacy”插件名称不会隐式包含在 action_groups 中。
module_defaults 中无法解析的组、操作插件和模块是错误。
ansible-test - 不再自动安装“cloud”测试插件的要求。受影响的测试插件是
aws
、azure
、cs
、hcloud
、nios
、opennebula
、openshift
和vcenter
。集合应改为使用受支持的集成测试需求文件之一,例如tests/integration/requirements.txt
文件。ansible-test - HTTP 测试器不再可用于
ansible-test shell
命令。只有integration
和windows-integration
命令提供 HTTP 测试器。ansible-test -
--disable-httptester
选项不再可用。对于指定 HTTP 测试器的测试,HTTP 测试器不再是可选的。ansible-test -
--httptester
选项不再可用。要覆盖用于 HTTP 测试器测试的容器,请改为设置ANSIBLE_HTTP_TEST_CONTAINER
环境变量。ansible-test -
modules
和module_utils
的单元测试现在仅限于从ansible
模块导入ansible.module_utils
。条件 -
when
条件不再自动将字符串布尔值(例如"true"
和"false"
)解析为实际的布尔值。任何非空字符串现在都被视为 true。CONDITIONAL_BARE_VARS
配置变量不再起任何作用。hostname - 通过使用
with open()
来简化异常处理代码(该代码在多个位置泄露了文件句柄),从而放弃对 Python 2.4 的任何剩余支持hostname - 在 FreeBSD 上,字符串
temporarystub
不再写入 get 方法(和 check_mode)中的主机名文件。因此,默认主机名现在将显示为''
(空字符串),而不是temporarystub
,以与其他策略保持一致。这意味着before
结果将有所不同。hostname - 在 OpenRC 系统和 Solaris 上,如果永久主机名文件不存在,则
before
值现在将为''
(空字符串),以与其他策略保持一致。intersect、difference、symmetric_difference、union 过滤器 - 默认行为现在是区分大小写 (https://github.com/ansible/ansible/issues/74255)
unique 过滤器 - 如果 Jinja2 的过滤器失败,则默认行为现在会失败,并且显式
case_sensitive=False
因为 Ansible 的回退是区分大小写的 (https://github.com/ansible/ansible/pull/74256)
amazon.aws
ec2_instance - 实例等待状态的行为已更改。如果剧本需要等待实例监控状态在新实例启动时变为
OK
的旧行为,则操作将需要指定state: started
(https://github.com/ansible-collections/amazon.aws/pull/481)。ec2_snapshot - 对无限期等待的支持已删除,新的默认值为 10 分钟 (https://github.com/ansible-collections/amazon.aws/pull/356)。
ec2_vol_info - 返回
attachment_set
现在是磁盘上支持多重附加的附件列表。(https://github.com/ansible-collections/amazon.aws/pull/362)。ec2_vpc_dhcp_option - 该模块已重构为使用 boto3。模块返回的键和值类型现在是一致的,这与之前的行为不同。已添加
purge_tags
选项,其默认值为True
。(https://github.com/ansible-collections/amazon.aws/pull/252)ec2_vpc_dhcp_option_info - 现在保留返回值中标签键的大小写。(https://github.com/ansible-collections/amazon.aws/pull/252)
module_utils.core - 已从区域参数中删除 boto3 开关 (https://github.com/ansible-collections/amazon.aws/pull/287)。
module_utils/compat - 已删除 ipaddress 的供应商副本 (https://github.com/ansible-collections/amazon.aws/pull/461)。
module_utils/core - 更新了
scrub_none_parameters
函数,以便默认将descend_into_lists
设置为True
(https://github.com/ansible-collections/amazon.aws/pull/297)。
arista.eos
Arista 发布了 4.23.X 及更新版本,并随之替换和弃用了一些命令。此 PR 添加了对 4.23 及更高版本中语法更改的支持。今后,eos 模块将不支持 eos sw 版本 < 4.23。
community.aws
ec2_instance - 该模块已迁移到
amazon.aws
集合。使用此模块的完全限定集合名称的剧本应更新为使用amazon.aws.ec2_instance
。ec2_instance_info - 该模块已迁移到
amazon.aws
集合。使用此模块的完全限定集合名称的剧本应更新为使用amazon.aws.ec2_instance_info
。ec2_vpc_endpoint - 该模块已从
community.aws
集合迁移。使用此模块的完全限定集合名称的 Playbook 应更新为使用amazon.aws.ec2_vpc_endpoint
。ec2_vpc_endpoint_facts - 该模块已从
community.aws
集合迁移。使用此模块的完全限定集合名称的 Playbook 应更新为使用amazon.aws.ec2_vpc_endpoint_info
。ec2_vpc_endpoint_info - 该模块已从
community.aws
集合迁移。使用此模块的完全限定集合名称的 Playbook 应更新为使用amazon.aws.ec2_vpc_endpoint_info
。ec2_vpc_endpoint_service_info - 该模块已从
community.aws
集合迁移。使用此模块的完全限定集合名称的 Playbook 应更新为使用amazon.aws.ec2_vpc_endpoint_service_info
。ec2_vpc_igw - 该模块已从
community.aws
集合迁移。使用此模块的完全限定集合名称的 Playbook 应更新为使用amazon.aws.ec2_vpc_igw
。ec2_vpc_igw_facts - 该模块已从
community.aws
集合迁移。使用此模块的完全限定集合名称的 Playbook 应更新为使用amazon.aws.ec2_vpc_igw_info
。ec2_vpc_igw_info - 该模块已从
community.aws
集合迁移。使用此模块的完全限定集合名称的 Playbook 应更新为使用amazon.aws.ec2_vpc_igw_info
。ec2_vpc_nat_gateway - 该模块已从
community.aws
集合迁移。使用此模块的完全限定集合名称的 Playbook 应更新为使用amazon.aws.ec2_vpc_nat_gateway
。ec2_vpc_nat_gateway_facts - 该模块已从
community.aws
集合迁移。使用此模块的完全限定集合名称的 Playbook 应更新为使用amazon.aws.ec2_vpc_nat_gateway_info
。ec2_vpc_nat_gateway_info - 该模块已从
community.aws
集合迁移。使用此模块的完全限定集合名称的 Playbook 应更新为使用amazon.aws.ec2_vpc_nat_gateway_info
。kms_info - 密钥详细信息现在在
kms_keys
属性中返回,而不是keys
属性中 (https://github.com/ansible-collections/community.aws/pull/648)。
community.crypto
调整
dirName
文本解析和文本转换代码,以符合 RFC 4514 的第 2 节和第 3 节。这类似于 cryptography 的处理方式 (https://github.com/ansible-collections/community.crypto/pull/274)。acme 模块实用程序 - 删除兼容性代码 (https://github.com/ansible-collections/community.crypto/pull/290)。
acme_* 模块 - 删除了 Python 库
ipaddress
的供应商副本。如果您使用的是 Python 2.x,请确保安装该库 (https://github.com/ansible-collections/community.crypto/pull/287)。compatibility module_utils - 删除了 Python 库
ipaddress
的供应商副本 (https://github.com/ansible-collections/community.crypto/pull/287)。crypto 模块实用程序 - 删除兼容性代码 (https://github.com/ansible-collections/community.crypto/pull/290)。
get_certificate、openssl_csr_info、x509_certificate_info - 根据使用的
cryptography
版本,模块可能不会返回证书或 CSR 中包含的扩展的 ASN.1 值,而是返回其重新编码的版本。除非该值格式错误,否则该值通常应与源文件中包含的值相同。对于 C(cryptography) 未处理的扩展,始终返回源文件中包含的未更改的值 (https://github.com/ansible-collections/community.crypto/pull/318)。module_utils - 删除了 openssl_pkcs12 模块不需要的各种 PyOpenSSL 支持函数和默认后端值 (https://github.com/ansible-collections/community.crypto/pull/273)。
openssl_csr、openssl_csr_pipe、x509_crl -
subject
和issuer
字段不再忽略空值,而是在遇到空值时失败 (https://github.com/ansible-collections/community.crypto/pull/316)。openssl_privatekey_info - 默认情况下,不运行一致性检查;需要通过传递
check_consistency=true
来显式请求 (https://github.com/ansible-collections/community.crypto/pull/309)。x509_crl - 对于幂等性检查,
issuer
顺序将被忽略。如果顺序很重要,请使用新的issuer_ordered
选项 (https://github.com/ansible-collections/community.crypto/pull/316)。
community.dns
所有处理 DNS 记录的 Hetzner 模块和插件现在默认使用未加引号的 TXT 值。可以通过设置
txt_transformation=api
来获得旧行为 (https://github.com/ansible-collections/community.dns/issues/48, https://github.com/ansible-collections/community.dns/pull/57, https://github.com/ansible-collections/community.dns/pull/60)。Hosttech API 创建 - 现在需要
ModuleOptionProvider
对象,而不是AnsibleModule
对象。或者,可以传递 Ansible 插件实例 (https://github.com/ansible-collections/community.dns/pull/37)。hetzner_dns_record_info 和 hosttech_dns_record_info 模块已分别重命名为 hetzner_dns_record_set_info 和 hosttech_dns_record_set_info (https://github.com/ansible-collections/community.dns/pull/54)。
hosttech_dns_record 模块已重命名为 hosttech_dns_record_set (https://github.com/ansible-collections/community.dns/pull/31)。
内部批量记录更新助手 (
bulk_apply_changes
) 现在还返回已删除、创建或更新的记录 (https://github.com/ansible-collections/community.dns/pull/63)。内部记录 API 不再允许显式管理注释 (https://github.com/ansible-collections/community.dns/pull/63)。
当使用内部模块 API 时,现在必须传递区域 ID 类型和提供程序信息对象 (https://github.com/ansible-collections/community.dns/pull/27)。
hetzner_dns_record* 模块 - 实现对默认 TTL 的正确处理。在这种情况下,现在接受并返回值
none
(https://github.com/ansible-collections/community.dns/pull/52, https://github.com/ansible-collections/community.dns/issues/50)。hetzner_dns_record、hetzner_dns_record_set、hetzner_dns_record_sets - 默认 TTL 现在为 300,不再是 3600,这等于 Web 控制台中的默认值 (https://github.com/ansible-collections/community.dns/pull/43)。
hosttech_* module_utils - 完全重写和重构,以支持新的 JSON API 并允许重用与提供程序无关的模块逻辑 (https://github.com/ansible-collections/community.dns/pull/4)。
hosttech_dns_record_set - 选项
overwrite
已被新选项on_existing
替换。指定overwrite=true
等效于on_existing=replace
(新的默认值)。使用state=present
指定overwrite=false
等效于on_existing=keep_and_fail
,使用state=absent
指定overwrite=false
等效于on_existing=keep
(https://github.com/ansible-collections/community.dns/pull/31)。
community.docker
docker_compose - 修复了
timeout
默认行为,以便在 compose 文件中定义了stop_grace_period
时,如果未指定 timeout,则将使用stop_grace_period
(https://github.com/ansible-collections/community.docker/pull/163)。
community.general
archive - 为
destination
文件中文件名和内容的变化添加幂等性检查 (https://github.com/ansible-collections/community.general/pull/3075)。lxd 清单插件 - 当与 Python 2 一起使用时,该插件现在需要安装
ipaddress
来自 pypi (https://github.com/ansible-collections/community.general/pull/2441)。scaleway_security_group_rule - 当与 Python 2 一起使用时,该模块现在需要安装
ipaddress
来自 pypi (https://github.com/ansible-collections/community.general/pull/2441)。
community.hashi_vault
连接选项 -
url
选项(Vault 地址)不再具有默认值,因此必须提供一个值 (https://github.com/ansible-collections/community.hashi_vault/issues/83)。
community.okd
删除 Python 2 支持 (https://github.com/openshift/community.okd/pull/93)。
community.routeros
api - 由于编程错误,该模块在错误情况下从未失败。现在已修复此问题。如果您依赖该模块在幂等命令的情况下不失败(导致诸如
failure: already have such address
的错误),您需要调整您的角色/剧本。我们建议使用failed_when
来接受特定情况下的失败,例如failed_when: "'failure: already have ' in result.msg[0]"
(https://github.com/ansible-collections/community.routeros/pull/39)。api - 拆分命令不再使用简单的空格拆分,而是使用更兼容 RouterOS CLI 的拆分算法 (https://github.com/ansible-collections/community.routeros/pull/45)。
command - 该模块现在始终指示发生了更改。如果这不正确,请使用
changed_when
来确定任务的正确更改状态 (https://github.com/ansible-collections/community.routeros/pull/50)。
community.zabbix
所有角色现在都通过其完全限定的集合名称引用其他角色和模块,这使得 Ansible 2.10 成为角色支持的最低版本(请参阅 issue 477)。
kubernetes.core
删除对 Python 2 的支持 (https://github.com/ansible-collections/kubernetes.core/pull/86)。
helm_plugin - 删除未使用的
release_namespace
参数 (https://github.com/ansible-collections/kubernetes.core/pull/85)。helm_plugin_info - 删除未使用的
release_namespace
参数 (https://github.com/ansible-collections/kubernetes.core/pull/85)。k8s_cluster_info - 将 apis 作为列表返回,以避免在存在多个版本时被覆盖 (https://github.com/ansible-collections/kubernetes.core/pull/41)。
k8s_facts - 从 k8s_facts 中删除已弃用的别名到 k8s_info (https://github.com/ansible-collections/kubernetes.core/pull/125)。
netapp.storagegrid
此版本引入了重大更改。所有模块都已从
nac_sg_*
重命名为na_sg_*
。必须更新剧本和角色以匹配。
重大更改
Ansible-core
Python 控制器要求 - 控制节点(运行 Ansible 的机器)需要 Python 3.8 或更高版本 (https://github.com/ansible/ansible/pull/74013)
ansible-test - 所有使用容器的“云”插件现在都可以在所有 POSIX 和 Windows 主机上使用。以前,这些插件根本无法在 Windows 上工作,并且对使用
--remote
选项创建的主机的支持不一致。ansible-test - 集合现在可以指定特定于控制器和目标的集成测试要求和约束。如果提供,它们将优先于之前可用的要求和约束文件。
ansible-test - 使用
integration
命令运行的集成测试现在可以在两个单独的主机上执行,而不是总是在控制器上运行。目标主机可以是ansible-test
提供的主机或用户提供的主机,只要它可以使用 SSH 访问即可。ansible-test - 现在 Podman 支持大多数容器功能。以前需要一个指向
podman
的docker
符号链接。ansible-test - 添加了新的
--controller
和--target
/--target-python
选项,以便更好地控制测试环境。ansible-test - 现在需要 Python 3.8 - 3.10 才能运行
ansible-test
,从而与 Ansible 控制器的 Python 要求相匹配。旧的 Python 版本(2.6 - 2.7 和 3.5 - 3.10)仍然可以是相关测试的目标。ansible-test - 现在仅使用 SSH 端口转发和重定向来使非容器主机上的容器端口可用。在 POSIX 系统上进行测试时,这需要以 root 身份 SSH 登录。以前,SSH 端口转发与防火墙规则或其他端口重定向方法相结合,某些平台不受支持。
ansible-test - 健全性测试始终在特定于每个测试要求的隔离 Python 虚拟环境中运行。环境已缓存。
ansible-test - 健全性测试现在分为两个类别:控制器和目标。除
import
和compile
之外的所有测试都是控制器测试。控制器测试始终使用用于运行ansible-test
的相同 Python 版本运行。目标测试使用用户指定的 Python 版本或所有可用的 Python 版本。ansible-test - 健全性测试现在使用完全固定的要求,这些要求彼此独立且与其他测试类型独立。
ansible-test - 当使用 Python 2.6 时,使用
centos6
和default
测试容器运行的测试现在使用 PyPI 代理容器来访问 PyPI。这允许在 Python 2.6 下运行的测试继续运行,即使 PyPI 正在停止对不支持 SNI 的客户端的支持。ansible-test -
future-import-boilerplate
和metaclass-boilerplate
健全性测试仅限于远程代码。此外,对于声明不支持 Python 2.x 的集合,将跳过这些测试。ansible-test -
import
和compile
健全性测试将远程 Python 版本检查限制为仅远程代码。ansible-test - 现在,仅限控制器的代码的单元测试需要 Python 3.8 或更高版本。
ansible-test - 现在,版本中性的健全性测试需要 Python 3.8 或更高版本。
junit 回调 - 不再需要使用
junit_xml
和ordereddict
Python 模块来使用junit
回调插件。
amazon.aws
amazon.aws 集合 - 由于 AWS SDK 宣布停止支持低于 3.6 的 Python (https://boto3.amazonaws.com/v1/documentation/api/1.17.64/guide/migrationpy3.html),此集合现在需要 Python 3.6+ (https://github.com/ansible-collections/amazon.aws/pull/298)。
amazon.aws 集合 - amazon.aws 集合已停止支持
botocore<1.18.0
和boto3<1.15.0
。大多数模块将继续与旧版本的 AWS SDK 一起工作,但是不保证与旧版本 SDK 的兼容性,并且不会进行测试。当使用旧版本的 SDK 时,Ansible 将发出警告 (https://github.com/ansible-collections/amazon.aws/pull/502)。ec2_instance - 该模块已从
community.aws
集合迁移。使用此模块的完全限定集合名称的剧本应更新为使用amazon.aws.ec2_instance
。ec2_instance_info - 该模块已从
community.aws
集合迁移。使用此模块的完全限定集合名称的剧本应更新为使用amazon.aws.ec2_instance_info
。ec2_vpc_endpoint - 该模块已从
community.aws
集合迁移。使用此模块的完全限定集合名称的 Playbook 应更新为使用amazon.aws.ec2_vpc_endpoint
。ec2_vpc_endpoint_facts - 该模块已从
community.aws
集合迁移。使用此模块的完全限定集合名称的 Playbook 应更新为使用amazon.aws.ec2_vpc_endpoint_info
。ec2_vpc_endpoint_info - 该模块已从
community.aws
集合迁移。使用此模块的完全限定集合名称的 Playbook 应更新为使用amazon.aws.ec2_vpc_endpoint_info
。ec2_vpc_endpoint_service_info - 该模块已从
community.aws
集合迁移。使用此模块的完全限定集合名称的 Playbook 应更新为使用amazon.aws.ec2_vpc_endpoint_service_info
。ec2_vpc_igw - 该模块已从
community.aws
集合迁移。使用此模块的完全限定集合名称的 Playbook 应更新为使用amazon.aws.ec2_vpc_igw
。ec2_vpc_igw_facts - 该模块已从
community.aws
集合迁移。使用此模块的完全限定集合名称的剧本应更新为使用amazon.aws.ec2_vpc_igw_facts
。ec2_vpc_igw_info - 该模块已从
community.aws
集合迁移。使用此模块的完全限定集合名称的 Playbook 应更新为使用amazon.aws.ec2_vpc_igw_info
。ec2_vpc_nat_gateway - 该模块已从
community.aws
集合迁移。使用此模块的完全限定集合名称的 Playbook 应更新为使用amazon.aws.ec2_vpc_nat_gateway
。ec2_vpc_nat_gateway_facts - 该模块已从
community.aws
集合迁移。使用此模块的完全限定集合名称的 Playbook 应更新为使用amazon.aws.ec2_vpc_nat_gateway_info
。ec2_vpc_nat_gateway_info - 该模块已从
community.aws
集合迁移。使用此模块的完全限定集合名称的 Playbook 应更新为使用amazon.aws.ec2_vpc_nat_gateway_info
。ec2_vpc_route_table - 该模块已从
community.aws
集合迁移。使用此模块的完全限定集合名称的剧本应更新为使用amazon.aws.ec2_vpc_route_table
。ec2_vpc_route_table_facts - 该模块已从
community.aws
集合迁移。使用此模块的完全限定集合名称的剧本应更新为使用amazon.aws.ec2_vpc_route_table_facts
。ec2_vpc_route_table_info - 该模块已从
community.aws
集合迁移。使用此模块的完全限定集合名称的剧本应更新为使用amazon.aws.ec2_vpc_route_table_info
。
cisco.ise
将
ise_uses_api_gateway
添加到模块选项。添加了一个 'aws_deployment' 角色,允许将任意大的 ISE 集群部署到 AWS。
将 ise_responses 添加到信息模块的返回值。
将 ise_update_response 添加到非信息模块的返回值。
修复了没有按名称获取且没有正常工作的过滤器的模块的内部逻辑。
将模块 device_administration_authorization_exception_rules 重命名为 device_administration_local_exception_rules。
将模块 device_administration_authorization_global_exception_rules 重命名为 device_administration_global_exception_rules。
将模块 network_access_authorization_exception_rules 重命名为 network_access_local_exception_rules。
将模块 network_access_authorization_global_exception_rules 重命名为 network_access_global_exception_rules。
更新模块所需的选项。
更新先前模块的 sdk 参数
device_administration_authorization_exception_rules - 删除模块。
device_administration_authorization_exception_rules_info - 删除模块。
device_administration_authorization_global_exception_rules - 删除模块。
device_administration_authorization_global_exception_rules_info - 删除模块。
guest_user_reinstante - 删除模块。
import_trust_cert - 删除模块。
network_access_authorization_exception_rules - 删除模块。
network_access_authorization_exception_rules_info - 删除模块。
network_access_authorization_global_exception_rules - 已移除模块。
network_access_authorization_global_exception_rules_info - 已移除模块。
personas_check_standalone - 添加模块,用于将角色部署到 ISE 集群中现有的节点。
personas_export_certs - 添加模块,用于将角色部署到 ISE 集群中现有的节点。
personas_promote_primary - 添加模块,用于将角色部署到 ISE 集群中现有的节点。
personas_update_roles - 添加模块,用于将角色部署到 ISE 集群中现有的节点。
service_info - 已移除模块。
system_certificate_export - 已移除模块。
telemetry_info_info - 已移除模块。
cloud.common
turbo - 为查找插件启用 turbo 模式
cloudscale_ch.cloud
添加 custom_image 模块
community.aws
community.aws 集合 - community.aws 集合已停止支持
botocore<1.18.0
和boto3<1.15.0
(https://github.com/ansible-collections/community.aws/pull/711)。大多数模块将继续使用旧版本的 AWS SDK,但是不保证与旧版本的 SDK 的兼容性,并且不会进行测试。当使用旧版本的 SDK 时,Ansible 将发出警告 (https://github.com/ansible-collections/amazon.aws/pull/442)。
community.ciscosmb
需要 Python 2.6、2.7、3.5
添加 CBS350 支持
添加 antsibull-changelog 支持
添加 ciscosmb_command
添加了 facts 子集“interfaces”
具有默认子集和单元测试的 ciscosmb_facts
接口名称规范化
将集合 qaxi.ciscosmb 转换为 community.ciscosmb
将 community.ciscosmb.ciscosmb_command 转换为 community.ciscosmb.command
将 community.ciscosmb.ciscosmb_facts 转换为 community.ciscosmb.facts
CBS350 的单元测试
community.dns
hosttech_* 模块 - 支持 https://api.ns1.hosttech.eu/api/documentation/ 上的新 JSON API (https://github.com/ansible-collections/community.dns/pull/4)。
community.general
bitbucket_* 模块 -
client_id
不再标记为no_log=true
。如果您依赖其值不显示在日志和输出中,请将整个任务标记为no_log: true
(https://github.com/ansible-collections/community.general/pull/2045)。
community.kubernetes
将所有内容从
community.kubernetes
重定向到kubernetes.core
(https://github.com/ansible-collections/community.kubernetes/pull/425)。
community.okd
更新以使用 kubernetes.core 2.0 (https://github.com/openshift/community.okd/pull/93)。
community.postgresql
postgresql_query -
as_single_query
选项的默认值将在 community.postgresql 2.0.0 中更改为yes
(https://github.com/ansible-collections/community.postgresql/issues/85)。
community.vmware
vmware_object_custom_attributes_info - 添加了一个新模块,用于收集对象的自定义属性 (https://github.com/ansible-collections/community.vmware/pull/851)。
containers.podman
为 Pod 添加 systemd 生成
为容器生成 systemd 服务文件
dellemc.openmanage
idrac_server_config_profile - 添加了通过 HTTP/HTTPS 共享导出和导入服务器配置文件的支持。
ome_device_group - 添加了使用设备的 IP 地址和组 ID 将设备添加到组的支持。
ome_firmware - 添加了暂存固件更新的选项,并支持为基于基线的固件更新选择组件和设备。
ome_firmware_baseline - 模块支持检查模式,并允许修改和删除固件基线。
ome_firmware_catalog - 模块支持检查模式,并允许修改和删除固件目录。
fortinet.fortios
在某些配置模块的示例部分中添加实际用例。
收集模块的当前配置,并将其转换为 playbook。
改进
fortios_configuration_fact
以同时使用多个选择器。新模块 fortios_monitor_fact。
支持 FortiOS 7.0.1。
支持 Fortios 7.0。
支持日志 API。
在所有基于 cofigurationAPI 的模块中支持
check_mode
。支持用于事实收集模块
fortios_configuration_fact
和fortios_monitor_fact
的过滤。支持对其中包含成员列表的对象执行成员操作(删除/添加额外的成员)。
支持在
firewall_central_snat_map
中移动策略。支持
fortios_monitor_fact
和fortios_log_fact
中的选择器功能。统一监视器 API 的架构。
gluster.gluster
在启动 gluster 卷之前启用 client.ssl,server.ssl (https://github.com/gluster/gluster-ansible-collection/pull/19)
hetzner.hcloud
引入放置组
kubernetes.core
k8s - 弃用 merge_type=json。JSON 修补功能从未起作用 (https://github.com/ansible-collections/kubernetes.core/pull/99)。
k8s_json_patch - 将 JSON 修补功能拆分为单独的模块 (https://github.com/ansible-collections/kubernetes.core/pull/99)。
用官方 Kubernetes 客户端替换 Openshift 客户端 (https://github.com/ansible-collections/kubernetes.core/issues/34)。
netapp.cloudmanager
将阶段环境添加到 cloudmanager 中的所有模块
netbox.netbox
packages 现在是必需的 Python 包,并通过 Ansible 2.10+ 安装。
openvswitch.openvswitch
错误地将仓库标记为 2.0.0,由于这不是本意并且无法回滚,因此我们发布 2.0.1 以使社区了解主要版本更新。
ovirt.ovirt
remove_stale_lun - 添加用于删除过时 LUN 的角色 (https://bugzilla.redhat.com/1966873)。
已删除的功能
Ansible-core
内置模块工具
ansible.module_utils.common.removed
此前已弃用,现已移除。connections,删除了已移至插件的密码检查存根。
task,已移除自动将内联参数强制转换为变量的操作。
ansible.windows
win_reboot - 移除自 Ansible 2.5 以来未执行任何操作的
shutdown_timeout
和shutdown_timeout_sec
。
community.crypto
acme_* 模块 - 现在需要
acme_directory
选项 (https://github.com/ansible-collections/community.crypto/pull/290)。acme_* 模块 - 现在需要
acme_version
选项 (https://github.com/ansible-collections/community.crypto/pull/290)。acme_account_facts - 已删除已弃用的重定向。请改用 community.crypto.acme_account_info (https://github.com/ansible-collections/community.crypto/pull/290)。
acme_account_info -
retrieve_orders=url_list
不再返回返回值orders
。请改用order_uris
返回值 (https://github.com/ansible-collections/community.crypto/pull/290)。crypto.info 模块工具 - 已删除已弃用的重定向。请改用
crypto.pem
(https://github.com/ansible-collections/community.crypto/pull/290)。get_certificate - 删除了
pyopenssl
后端 (https://github.com/ansible-collections/community.crypto/pull/273)。openssl_certificate - 已删除已弃用的重定向。请改用 community.crypto.x509_certificate (https://github.com/ansible-collections/community.crypto/pull/290)。
openssl_certificate_info - 已删除已弃用的重定向。请改用 community.crypto.x509_certificate_info (https://github.com/ansible-collections/community.crypto/pull/290)。
openssl_csr - 删除了
pyopenssl
后端 (https://github.com/ansible-collections/community.crypto/pull/273)。openssl_csr 和 openssl_csr_pipe -
version
现在只接受 (默认) 值 1 (https://github.com/ansible-collections/community.crypto/pull/290)。openssl_csr_info - 移除
pyopenssl
后端 (https://github.com/ansible-collections/community.crypto/pull/273)。openssl_csr_pipe - 移除
pyopenssl
后端 (https://github.com/ansible-collections/community.crypto/pull/273)。openssl_privatekey - 移除
pyopenssl
后端 (https://github.com/ansible-collections/community.crypto/pull/273)。openssl_privatekey_info - 移除
pyopenssl
后端 (https://github.com/ansible-collections/community.crypto/pull/273)。openssl_privatekey_pipe - 移除
pyopenssl
后端 (https://github.com/ansible-collections/community.crypto/pull/273)。openssl_publickey - 移除
pyopenssl
后端 (https://github.com/ansible-collections/community.crypto/pull/273)。openssl_publickey_info - 移除
pyopenssl
后端 (https://github.com/ansible-collections/community.crypto/pull/273)。openssl_signature - 移除
pyopenssl
后端 (https://github.com/ansible-collections/community.crypto/pull/273)。openssl_signature_info - 移除
pyopenssl
后端 (https://github.com/ansible-collections/community.crypto/pull/273)。x509_certificate - 移除
assertonly
提供者 (https://github.com/ansible-collections/community.crypto/pull/289)。x509_certificate - 移除
pyopenssl
后端 (https://github.com/ansible-collections/community.crypto/pull/273)。x509_certificate_info - 移除
pyopenssl
后端 (https://github.com/ansible-collections/community.crypto/pull/273)。x509_certificate_pipe - 移除
pyopenssl
后端 (https://github.com/ansible-collections/community.crypto/pull/273)。
community.docker
docker_container -
container_default_behavior
的默认值已更改为no_defaults
(https://github.com/ansible-collections/community.docker/pull/210)。docker_container - 如果指定了
networks
并且networks_cli_compatible=true
,则network_mode
的默认值现在是networks
中指定的第一个网络的名称 (https://github.com/ansible-collections/community.docker/pull/210)。docker_container - 特殊值
all
不能再与published_ports
中的其他值一起使用。请改用publish_all_ports=true
(https://github.com/ansible-collections/community.docker/pull/210)。docker_login - 移除
email
选项 (https://github.com/ansible-collections/community.docker/pull/210)。
community.general
community.general 中包含的所有清单和 vault 脚本都已移动到 contrib-scripts GitHub 存储库 (https://github.com/ansible-collections/community.general/pull/2696)。
ModuleHelper 模块实用程序 - 当无法确定参数的值时,移除回退 (https://github.com/ansible-collections/community.general/pull/3461)。
移除已弃用的 netapp 模块实用程序和文档片段 (https://github.com/ansible-collections/community.general/pull/3197)。
nios、nios_next_ip、nios_next_network 查找插件、nios 文档片段以及 nios_host_record、nios_ptr_record、nios_mx_record、nios_fixed_address、nios_zone、nios_member、nios_a_record、nios_aaaa_record、nios_network、nios_dns_view、nios_txt_record、nios_naptr_record、nios_srv_record、nios_cname_record、nios_nsgroup 和 nios_network_view 模块已从 community.general 4.0.0 中移除,并被重定向到 infoblox.nios_modules 集合。请安装
infoblox.nios_modules
集合以继续使用这些插件和模块,并更新您的 FQCN (https://github.com/ansible-collections/community.general/pull/3592)。已移除
ipaddress
的供应商副本。请使用 Python 3 标准库中的ipaddress
,或 从 pypi 获取。 (https://github.com/ansible-collections/community.general/pull/2441)。cpanm - 移除已弃用的
system_lib
选项。请改用 Ansible 的权限提升机制;该选项基本上使用了sudo
(https://github.com/ansible-collections/community.general/pull/3461)。grove - 移除已弃用的
message
别名,它是message_content
选项的别名 (https://github.com/ansible-collections/community.general/pull/3461)。proxmox -
proxmox_default_behavior
的默认值已更改为no_defaults
(https://github.com/ansible-collections/community.general/pull/3461)。proxmox_kvm -
proxmox_default_behavior
的默认值已更改为no_defaults
(https://github.com/ansible-collections/community.general/pull/3461)。runit - 移除该模块未使用的已弃用的
dist
选项 (https://github.com/ansible-collections/community.general/pull/3461)。telegram - 移除已弃用的
msg
、msg_format
和chat_id
选项 (https://github.com/ansible-collections/community.general/pull/3461)。xfconf -
disable_facts
的默认值已更改为true
,并且不再允许值false
。请改为注册模块结果 (https://github.com/ansible-collections/community.general/pull/3461)。
community.hashi_vault
停止支持 Python 2 和 Python 3.5 (https://github.com/ansible-collections/community.hashi_vault/issues/81)。
已移除对以下已弃用环境变量的支持:
VAULT_AUTH_METHOD
、VAULT_TOKEN_PATH
、VAULT_TOKEN_FILE
、VAULT_ROLE_ID
、VAULT_SECRET_ID
(https://github.com/ansible-collections/community.hashi_vault/pull/173)。
已弃用的功能
Ansible-core
ansible-test -
--docker-no-pull
选项已弃用,并且无效。ansible-test -
--no-pip-check
选项已弃用,并且无效。include 操作已弃用,请使用 include_tasks、import_tasks 和 import_playbook。
module_utils 的 FileLock 计划被移除,由于其不可靠的性质,因此不使用它。
amazon.aws
ec2 - 基于 boto 的
ec2
模块已被弃用,请使用基于 boto3 的ec2_instance
模块。ec2
模块将在 4.0.0 版本中移除 (https://github.com/ansible-collections/amazon.aws/pull/424)。ec2_classic_lb - 设置
ec2_elb
事实已被弃用,并将在该集合的 4.0.0 版本中移除。该模块现在返回elb
,可以使用 register 关键字访问 (https://github.com/ansible-collections/amazon.aws/pull/552)。ec2_vpc_dhcp_option -
new_config
返回键已被弃用,并将在未来版本中移除。它将被dhcp_config
替换。过渡期间,两个值都将返回。 (https://github.com/ansible-collections/amazon.aws/pull/252)
ansible.netcommon
network_cli - paramiko_ssh 设置
look_for_keys
是根据传递给 network_cli 的password
和private_key_file
选项的值自动设置的。此选项现在可以显式设置,并且look_for_keys
的自动设置将在 2024-01-01 之后移除 (https://github.com/ansible-collections/ansible.netcommon/pull/271)。
ansible.windows
win_reboot - 可以使用
ignore_errors: True
忽略无法访问的主机,此功能将在未来版本中移除。请使用ignore_unreachable: True
来忽略无法访问的主机。- https://github.com/ansible-collections/ansible.windows/issues/62win_updates - 已弃用每个已过滤更新的
filtered_reason
返回值,改为使用filtered_reasons
。这样做是为了显示更新被过滤的所有原因,而不仅仅是第一个原因。win_updates - 已弃用
use_scheduled_task
选项,因为它不再使用。win_updates - 已弃用
whitelist
和blacklist
选项,改为使用accept_list
和reject_list
,以符合 Ansible 中用于此类选项的新标准。
arista.eos
移除使用 provider 进行 ansible-test 集成作业的测试。这有助于我们准备迁移到 network-ee 集成测试。
cisco.ios
已弃用 ios_bgp,推荐使用 ios_bgp_global 和 ios_bgp_address_family。
已弃用 ios_ntp 模块。
移除使用 provider 进行 ansible-test 集成作业的测试。这有助于我们准备迁移到 network-ee 集成测试。
cisco.iosxr
iosxr_logging 模块已被弃用,推荐使用新的 iosxr_logging_global 资源模块,并将在“2023-08-01”之后的版本中移除。
cisco.nxos
已弃用 nxos_ntp、nxos_ntp_options、nxos_ntp_auth 模块。
nxos_logging 模块已被弃用,推荐使用新的 nxos_logging_global 资源模块,并将在“2023-08-01”之后的版本中移除。
community.aws
dynamodb_table - 当创建
ALL
索引时,DynamoDB 不支持指定非键属性。目前,为此类索引传递includes
会被忽略,但在 3.0.0 版本之后会导致失败 (https://github.com/ansible-collections/community.aws/pull/726)。dynamodb_table - DynamoDB 不支持更新表上的主索引。目前尝试进行此类更改会被忽略,但在 3.0.0 版本之后会导致失败 (https://github.com/ansible-collections/community.aws/pull/726)。
ec2_elb -
ec2_elb
模块已被删除并重定向到功能相同的elb_instance
模块。原始的ec2_elb
名称现在已被弃用,并将在 3.0.0 版本中移除 (https://github.com/ansible-collections/community.aws/pull/586)。ec2_elb_info - 基于 boto 的
ec2_elb_info
模块已被弃用,推荐使用基于 boto3 的elb_classic_lb_info
模块。ec2_elb_info
模块将在 3.0.0 版本中移除 (https://github.com/ansible-collections/community.aws/pull/586)。elb_classic_lb -
elb_classic_lb
模块已被删除并重定向到功能相同的amazon.aws.ec2_elb_lb
模块。elb_instance - 设置
ec2_elb
事实已被弃用,并将在该集合的 4.0.0 版本中移除。请参阅模块文档,了解使用 register 关键字的替代示例 (https://github.com/ansible-collections/community.aws/pull/773)。iam - 基于 boto 的
iam
模块已被弃用,推荐使用基于 boto3 的iam_user
、iam_group
和iam_role
模块。iam
模块将在 3.0.0 版本中移除 (https://github.com/ansible-collections/community.aws/pull/664)。iam_cert - iam_cert 模块已重命名为 iam_server_certificate,以便与配套的 iam_server_certificate_info 模块保持一致。模块的使用方式没有改变。iam_cert 别名将在 4.0.0 版本中移除 (https://github.com/ansible-collections/community.aws/pull/728)。
iam_server_certificate - 将文件名传递给
cert
、chain_cert
和key
参数已被弃用。我们建议使用 lookup 插件来读取文件,请参阅文档中的示例 (https://github.com/ansible-collections/community.aws/pull/735)。iam_server_certificate -
dup_ok
参数的默认值目前为false
,在 4.0.0 版本中将更新为true
。要保留当前行为,请显式将dup_ok
参数设置为false
(https://github.com/ansible-collections/community.aws/pull/737)。rds - 基于 boto 的
rds
模块已被弃用,推荐使用基于 boto3 的rds_instance
模块。rds
模块将在 3.0.0 版本中移除 (https://github.com/ansible-collections/community.aws/pull/663)。rds_snapshot - rds_snapshot 模块已重命名为 rds_instance_snapshot。模块的使用方式没有改变。rds_snapshot 别名将在 4.0.0 版本中移除 (https://github.com/ansible-collections/community.aws/pull/783)。
script_inventory_ec2 - ec2.py 清单脚本正在迁移到一个新的存储库。该脚本现在可以从 https://github.com/ansible-community/contrib-scripts/blob/main/inventory/ec2.py 下载,并将在 3.0 版本中从此集合中移除。我们建议从脚本迁移到 amazon.aws.ec2 清单插件。
community.azure
所有 community.azure.azure_rm_<resource>_facts 模块都已弃用。请改用 azure.azcollection.azure_rm_<resource>_info 模块 (https://github.com/ansible-collections/community.azure/pull/24)。
所有 community.azure.azure_rm_<resource>_info 模块都已弃用。请改用 azure.azcollection.azure_rm_<resource>_info 模块 (https://github.com/ansible-collections/community.azure/pull/24)。
community.azure.azure_rm_managed_disk 和 community.azure.azure_rm_manageddisk 已被弃用。请改用 azure.azcollection.azure_rm_manageddisk (https://github.com/ansible-collections/community.azure/pull/24)。
community.azure.azure_rm_virtualmachine_extension 和 community.azure.azure_rm_virtualmachineextension 已被弃用。请改用 azure.azcollection.azure_rm_virtualmachineextension (https://github.com/ansible-collections/community.azure/pull/24)。
community.azure.azure_rm_virtualmachine_scaleset 和 community.azure.azure_rm_virtualmachinescaleset 已被弃用。请改用 azure.azcollection.azure_rm_virtualmachinescaleset (https://github.com/ansible-collections/community.azure/pull/24)。
community.crypto
acme_* 模块 - ACME 版本 1 现已弃用,并且对它的支持将在 community.crypto 2.0.0 中移除 (https://github.com/ansible-collections/community.crypto/pull/288)。
community.dns
hosttech_dns_records 模块已重命名为 hosttech_dns_record_sets。旧名称将在 community.dns 3.0.0 中停止工作 (https://github.com/ansible-collections/community.dns/pull/31)。
community.docker
docker_* 模块和插件,除了
docker_swarm
连接插件和docker_compose
和docker_stack*` 模块 - ``tls_hostname``
的当前默认值localhost
已被弃用。在 community.docker 2.0.0 中,它将改为从docker_host
计算 (https://github.com/ansible-collections/community.docker/pull/134)。docker_container - 新的
command_handling
的默认值compatibility
已被弃用,并将在 community.docker 3.0.0 中更改为correct
。如果行为将发生更改,模块会发出弃用警告。请注意,ansible-core 只会输出一次弃用警告,因此,如果之前的任务显示了该警告,则可能还有更多任务具有此警告但未显示 (https://github.com/ansible-collections/community.docker/pull/186)。docker_container - 在
published_ports
中使用特殊值all
已被弃用。请改用publish_all_ports=true
(https://github.com/ansible-collections/community.docker/pull/210)。
community.general
对 Ansible 2.9 和 ansible-base 2.10 的支持已弃用,并将在下一个主要版本(community.general 5.0.0,计划于明年春季发布)中移除。虽然大多数内容可能仍然可以与 ansible-base 2.10 一起使用,但我们将删除模块和操作插件的符号链接,这将使其无法再与 Ansible 2.9 一起使用。请使用 community.general 4.x.y 与 Ansible 2.9 和 ansible-base 2.10,因为这些版本即使在它们生命周期结束后(https://github.com/ansible-community/community-topics/issues/50, https://github.com/ansible-collections/community.general/pull/3723)仍将继续支持 Ansible 2.9 和 ansible-base 2.10。
ali_instance_info - 标记了已弃用参数
availability_zone
和instance_names
的移除版本 (https://github.com/ansible-collections/community.general/issues/2429)。bitbucket_* 模块 -
username
选项已被弃用,推荐使用workspace
,并将在 community.general 6.0.0 中删除 (https://github.com/ansible-collections/community.general/pull/2045)。dnsimple - python-dnsimple < 2.0.0 已被弃用,对其的支持将在 community.general 5.0.0 中移除 (https://github.com/ansible-collections/community.general/pull/2946#discussion_r667624693)。
gitlab_group_members - 将
gitlab_group
设置为name
或path
已被弃用。请改用full_path
(https://github.com/ansible-collections/community.general/pull/3451)。keycloak_authentication - 返回值
flow
现在已被弃用,并将在 community.general 6.0.0 中移除;请改用end_state
(https://github.com/ansible-collections/community.general/pull/3280)。keycloak_group - 返回值
group
现在已被弃用,并将在 community.general 6.0.0 中移除;请改用end_state
(https://github.com/ansible-collections/community.general/pull/3280)。linode - 参数
backupsenabled
已被弃用,并将在 community.general 5.0.0 中移除 (https://github.com/ansible-collections/community.general/pull/2410)。lxd_container -
ignore_volatile_options
当前的默认值true
已被弃用,并且将在 community.general 6.0.0 中更改为false
(https://github.com/ansible-collections/community.general/pull/3429)。serverless - 弃用参数
functions
,因为它在代码中未使用 (https://github.com/ansible-collections/community.general/pull/2845)。xfconf - 弃用
get
状态。应改用新的模块xfconf_info
(https://github.com/ansible-collections/community.general/pull/3049)。
community.grafana
grafana_dashboard lookup - 不再推荐使用经过混淆处理的 API 密钥版本。
community.hashi_vault
hashi_vault 集合 - 在
community.hashi_vault
的2.0.0
版本中将放弃对 Python 2 的支持 (https://github.com/ansible-collections/community.hashi_vault/issues/81)。hashi_vault 集合 - 在
community.hashi_vault
的2.0.0
版本中将放弃对 Python 3.5 的支持 (https://github.com/ansible-collections/community.hashi_vault/issues/81)。lookup hashi_vault -
ansible.cfg
文件中的[lookup_hashi_vault]
部分已被弃用,并将在集合版本3.0.0
中删除。可以使用[hashi_vault_collection]
部分代替,该部分将应用于该集合中所有后续插件 (https://github.com/ansible-collections/community.hashi_vault/pull/144)。
community.kubernetes
community.kubernetes
集合正在重命名为kubernetes.core
。该集合中的所有内容都已被指向kubernetes.core
的已弃用重定向所取代。如果您使用以community.kubernetes
开头的 FQCN,请将其更新为kubernetes.core
(https://github.com/ansible-collections/community.kubernetes/pull/439)。
community.vmware
vmware_guest_vnc - Sphere 7.0 删除了内置的 VNC 服务器 (https://docs.vmware.com/en/VMware-vSphere/7.0/rn/vsphere-esxi-vcenter-server-70-release-notes.html#productsupport)。
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。
junipernetworks.junos
ospfv2 资源模块中已弃用 router_id。
ospfv3 资源模块中已弃用 router_id。
junos_logging 模块已被弃用,建议使用新的 junos_logging_global 资源模块,并将在 ‘2023-08-01’ 之后的版本中删除。
vyos.vyos
vyos_logging 模块已被弃用,建议使用新的 vyos_logging_global 资源模块,并将在 “2023-08-01” 之后的版本中删除。