gpt4 book ai didi

ansible/terraform-provider-ansible - > specifies unknown plugin 'cloud.terraform.terraform_provider(Anable/terraform-Provider-Ansible->指定未知插件‘Cloud.terraform.terraform_Provider)

转载 作者:bug小助手 更新时间:2023-10-25 12:57:44 27 4
gpt4 key购买 nike



As described in the blog post https://www.sysadminstories.com/2023/04/a-quick-look-at-terraform-provider-for.html, I have created the same Terraform deployment, but with a difference in the Azure cloud. I have created a Linux VM and then executed the following code:

正如博文https://www.sysadminstories.com/2023/04/a-quick-look-at-terraform-provider-for.html,中所描述的,我已经创建了相同的Terraform部署,但在Azure云中有所不同。我已经创建了一个Linux VM,然后执行了以下代码:


resource "ansible_host" "azu_instance" {
name = azurerm_linux_virtual_machine.mylinuxvm.public_ip_address
variables = {
ansible_user = var.ansible_user
ansible_ssh_private_key_file = var.ansible_ssh_key
}
depends_on = [time_sleep.wait_20_seconds]
}

In the Azure portal, I am not getting a DNS name for the Linux VM, only an IP address, which I pass to the Ansible inventory file. I hope this is okay.

在Azure门户中,我没有得到Linux VM的DNS名称,只有IP地址,我将其传递给Ansible清单文件。我希望这没问题。


Unfortunately, I keep getting the same error:

不幸的是,我一直收到相同的错误:


WARNING]:  * Failed to parse /inventory.yml with auto plugin: inventory config 'ansible_terraform_provider/v2/inventory.yml' specifies unknown plugin 'cloud.terraform.terraform_provider' [WARNING]:  * Failed to parse ansible_terraform_provider/v2/inventory.yml with yaml plugin: Plugin configuration YAML file, not YAML inventory [WARNING]:  * Failed to parse ansible_terraform_provider/v2/inventory.yml with ini plugin: Invalid host pattern 'plugin:' supplied, ending in ':' is not allowed, this character is reserved to provide a port. [WARNING]: Unable to parse ansible_terraform_provider/v2/inventory.yml as an inventory source [WARNING]: No inventory was parsed, only implicit localhost is available 

I have already registered the Terraform provider:

我已经注册了Terraform提供程序:


Initializing provider plugins...
erraform.io/builtin/terraform is built into Terraform

Reusing the previous version of azure/azapi from the dependency lock file

Reusing the previous version of ansible/ansible from the dependency lock file

Reusing the previous version of hashicorp/azurerm from the dependency lock file

Reusing the previous version of hashicorp/random from the dependency lock file

Reusing the previous version of hashicorp/time from the dependency lock file

Using the previously installed ansible/ansible v1.0.0

Using the previously installed hashicorp/azurerm v3.72.0

Using the previously installed hashicorp/random v3.5.1

Using the previously installed hashicorp/time v0.9.1

Using the previously installed azure/azapi v1.9.0

Thank you for any tips or a link to the solution for this issue.

感谢您的任何提示或指向此问题解决方案的链接。


更多回答

It looks like you did not install the relevant collection

看起来您没有安装相关的集合

@Zeitounator Thank you very much for the tip and your help. After I installed that, I can move on. ansible-galaxy collection install cloud.terraform I wish you a nice week Dim

@Zeitounator非常感谢您的提示和帮助。在我安装它之后,我就可以继续前进了。可能-银河收藏安装云。Terraform我祝你度过美好的一周,阴暗

优秀答案推荐
更多回答

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com