Closed eric-aops closed 4 years ago
Hi, Just found the solution to my problem. I needed to set ForwardAgent=yes in my ansible.cfg. But in doing so I'm seriously slowing down the configuration you are using.
Can you add a key to ansible_ssh_settings.go to be able to set this from within the provisioner?
Kind regards,
Eric
PS: just remembered I can overwrite with an inventory variable :-). Back to normal speed and it all works.
Steps to reproduce
I use terraform-provisioner-ansible in combination with AWS and it works flawless. But we also use GCP as a provider so I wanted to use it there too. Even though I can run 'remote-exec' commands on the 'private' node through the bastion connection, Ansible playbooks can't seem to connect.
Expected behavior
Run Ansible playbooks in the same way they perfectly work on AWS ...
Actual behavior
With the same configuration in place, this is the error that gets thrown:
...
Configuration
Terraform version: 0.12.18 terraform-provisioner-ansible version/SHA: v2.3.3 Terraform file / provisioner configuration:
So with the above connection setting the remote-exec works as expected, the Ansible provisioner throws the error.
Terraform run log: