Comments (6)
I used this "very dirty" but effective workaround ...
provisioner "ansible" {
playbook_file = "${path.cwd}/provisionning/${var.name}/playbooks/${var.name}.yaml"
ansible_env_vars = [
"ANSIBLE_SSH_ARGS='-oHostKeyAlgorithms=+ssh-rsa -oPubkeyAcceptedKeyTypes=ssh-rsa'",
"ANSIBLE_HOST_KEY_CHECKING=False"
]
user="${local.ssh_user}"
}
from packer-plugin-ansible.
@puppetmaster Yes, I used a similar approach. Best solution I found, that pleases business environments, is to build an image with packer first because packer has the ansible provisioner built it, then call that image in my terraform build whether it is AWS, proxmox, vmware etc. Then have ansible scripts set up for any extra needed configuration management. I know this requires more code, but the process is a little smoother.
from packer-plugin-ansible.
Same experience here.
Packer version: 1.7.3
Ansible version: 2.10.5
Python version: 3.6.9
from packer-plugin-ansible.
Same problem here.
Packer 1.7.5
Ansible Core 2.11.5
Python 3.9.7
Fedora 34
That workaround works though.
from packer-plugin-ansible.
Same issue here. The workaround is not business friendly.
from packer-plugin-ansible.
I had the same problem recently and I found aws ec2 inventory plugin for ansible could be a solution.
https://docs.ansible.com/ansible/latest/collections/amazon/aws/aws_ec2_inventory.html
I found this from my private repo created 3 years ago, so not sure this is relevant today.
working example.
https://github.com/Y4suyuki/whisper-server/blob/main/aws_ec2.yml
from packer-plugin-ansible.
Related Issues (20)
- Setup module fails on azure VM build with no error HOT 1
- Amazon Ubuntu AMI: fail to handshake HOT 4
- Can't use Ansible provisioner with just SSH username and password HOT 1
- ansible_env_vars are not set before version check
- `ansible_ssh_extra_args` not passing arguments to SSH correctly HOT 4
- Ansible provisioner doesn't honor winrm_use_ssl option from WinRM communicator HOT 6
- Build fails from RHEL 9.2 HOT 3
- ansible-local provisioner cannot set packer_http_addr properly when the variable is not implemented
- Ansible Provisionner auto-generated keys are blank (Linux) HOT 1
- Ansible incorrectly attempts connection to localhost (127.0.0.1) instead of host from packer inventory HOT 2
- packer execution time has increased by two/four times after updating the version from 1.1.4 to any higher version HOT 1
- ansible does not use ansible.builtin.include_vars in pre_tasks and use only roles:
- How to make ansible-provisioner not error out if a role is already installed HOT 1
- Only see stdout on Errors HOT 1
- Install ansible roles and collections at the same time from the same requirements.yml file? HOT 3
- When use ansible provisioner, packer can't find role HOT 1
- Ansible playbook become: true not working when using with packer HOT 4
- Different values from group_vars between plain and Packer Ansible runs HOT 1
- ansible_ssh_extra_args fails with multiple -o params
- Packer 1.12.0-alpha1 testing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from packer-plugin-ansible.