tag:blogger.com,1999:blog-555576322574773333.post620929049035174066..comments2024-03-01T11:48:39.478+02:00Comments on Sysadmin Stories: A Quick Look At Terraform Provider for Ansiblerazzhttp://www.blogger.com/profile/15640437268011558371noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-555576322574773333.post-61181354944679114652023-09-19T21:07:50.953+03:002023-09-19T21:07:50.953+03:00Looks like you are missing cloud.terraform.terrafo...Looks like you are missing cloud.terraform.terraform_provider which you need to install from the ansible collection (https://github.com/ansible-collections/cloud.terraform)razzhttps://www.blogger.com/profile/15640437268011558371noreply@blogger.comtag:blogger.com,1999:blog-555576322574773333.post-74817728319232659082023-09-10T19:02:04.098+03:002023-09-10T19:02:04.098+03:00Hello,
As described in the blog post https://www....Hello,<br /><br />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:<br /><br />hcl<br />Copy code<br />resource "ansible_host" "azu_instance" {<br /> name = azurerm_linux_virtual_machine.mylinuxvm.public_ip_address<br /> variables = {<br /> ansible_user = var.ansible_user<br /> ansible_ssh_private_key_file = var.ansible_ssh_key<br /> }<br /> depends_on = [time_sleep.wait_20_seconds]<br />}<br />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.<br /><br />Unfortunately, I keep getting the same error:<br /><br />csharp<br />Copy code<br />[WARNING]: * Failed to parse /inventory.yml with auto plugin: inventory config 'ansible_terraform_provider/v2/inventory.yml' specifies unknown plugin 'cloud.terraform.terraform_provider'<br />[WARNING]: * Failed to parse ansible_terraform_provider/v2/inventory.yml with yaml plugin: Plugin configuration YAML file, not YAML inventory<br />[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.<br />[WARNING]: Unable to parse ansible_terraform_provider/v2/inventory.yml as an inventory source<br />[WARNING]: No inventory was parsed, only implicit localhost is available<br />I have already registered the Terraform provider:<br /><br />sql<br />Copy code<br />Initializing provider plugins...<br />- terraform.io/builtin/terraform is built into Terraform<br />- Reusing the previous version of azure/azapi from the dependency lock file<br />- Reusing the previous version of ansible/ansible from the dependency lock file<br />- Reusing the previous version of hashicorp/azurerm from the dependency lock file<br />- Reusing the previous version of hashicorp/random from the dependency lock file<br />- Reusing the previous version of hashicorp/time from the dependency lock file<br />- Using the previously installed ansible/ansible v1.0.0<br />- Using the previously installed hashicorp/azurerm v3.72.0<br />- Using the previously installed hashicorp/random v3.5.1<br />- Using the previously installed hashicorp/time v0.9.1<br />- Using the previously installed azure/azapi v1.9.0<br />Thank you for any tips or a link to the solution for this issue.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-555576322574773333.post-18936544642798814182023-06-20T04:29:22.133+03:002023-06-20T04:29:22.133+03:00How about not installed Ansible and all dependenci...How about not installed Ansible and all dependencies in nodes?Anonymousnoreply@blogger.com