Azure网络安全组的Ansible剧本-错误:缺少必需的参数 [英] ansible playbook for Azure network security group - Error: missing required arguments
本文介绍了Azure网络安全组的Ansible剧本-错误:缺少必需的参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在用于创建 Azure网络安全组
的 YAML剧本
之后,请指定 priority
参数.但是在 Azure Cloud Shell
中运行剧本时,我仍然收到以下错误.错误的可能原因是什么,我们该如何解决?
备注:我看到类似的问题发布在 GitHub
Following YAML playbook
for creating Azure Network Security Group
DOES specify the priority
arguments. But I still get the following error when running the playbook in Azure Cloud Shell
. What may be the cause of the error and how can we fix it?
Remark: I see a similar issue posted on GitHub
here.
Create_network_security_group.yaml:
---
- hosts: localhost
tasks:
- azure_rm_securitygroup:
resource_group: rg-cs-ansible
name: nsg-cs-web
rules:
- name: 'allow_rdp'
protocol: Tcp
destination_port_range: 3389
access: Allow
priority: 1001
direction: Inbound
- name: 'allow_web_traffic'
protocol: Tcp
destination_port_range:
- 80
- 443
access: Allow
priority: 1002
direction: Inbound
- name: 'allow_powershell_remoting'
protocol: Tcp
destination_port_range:
- 5985
- 5986
Error:
[localhost]: FAILED! => {"changed": false, "msg": "missing required arguments: priority found in rules"}
解决方案
As per the official document located here, priority is required for each rule defined.
这篇关于Azure网络安全组的Ansible剧本-错误:缺少必需的参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文