简体   繁体   English

使用Ansible在Azure中创建VM时发生错误

[英]Error occuer when creating a VM in azure using ansible

i am using azure=0.11.1 and also tried in 1.0.1 version and execute it but i getting same error which mention below, playbook is mention below: 我正在使用azure = 0.11.1并也在1.0.1版本中尝试过并执行它,但是我遇到了以下提到的错误,以下是playbook的提及:

azurevm_yml azurevm_yml

--- - local_action: module: "azure" name: 'vm_ubuntu1' role_size: Small image: '5112500ae3b842c8b9c604889f8753c3__OpenLogic-CentOS-67-20150815' password: "admin12345@" location: 'East US 2' user: admin wait: yes subscription_id: 'xxxxxxxxxxxxxx' management_cert_path: '/ansible-pbook/xxxx.pem' storage_account: 'storageacc01' endpoints: '22,8080,80' register: azure_vm

Error: 错误:

root@xxxxx:/ansible-pbook# ansible-playbook azure_vm.yml ERROR: password is not a legal parameter of an Ansible Play

Please suggest me... 请建议我...

The correct format for a task is something like this: 任务的正确格式如下所示:

- local_action: azure
    name='vm_ubuntu1'
    role_size=Small
    image='5112500ae3b842c8b9c604889f8753c3__OpenLogic-CentOS-67-20150815'
    password="admin12345@"
    location='East US 2'
    user=admin
    wait=yes
    subscription_id='xxxxxxxxxxxxxx'
    management_cert_path='/ansible-pbook/xxxx.pem'
    storage_account='storageacc01'
    endpoints='22,8080,80'
  register: azure_vm

All the parameters passed to the module should be in the format of key=value , while attributes to the task/action itself (like register , tags , ignore_errors , etc.) are in the format of attribute: value 传递给模块的所有参数都应采用key=value的格式,而任务/操作本身的属性(如registertagsignore_errors等)应采用attribute: value的格式

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM