-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build fails from RHEL 9.2 #163
Comments
I have done some more digging into this. I have installed a fresh machine with RHEL 9.2 and installed packer on it. I have installed a fresh machine running RHEL 8.7 the same way as the 9.2 using the almost same kickstart file and installed packer on it. With RHEL 8.7 both With RHEL 9.2 I have to do |
I had the same problem and when I changed the use_proxy to false the default generated ansible key are empty and the communication didn't work. |
Overview of the Issue
Building a machine works fine with vsphere.iso until Ansible connects to the machine and fails with the following error message:
mux_client_read_packet: read header failed: Broken pipe
It fails when I run the build from a machine running Rocky Linux 9.2.
It does not fail if I run the build from a laptop running Ubuntu in WSL and using a bstion host running RHEL 7.9.
I have tried building both RHEL 8 and RHEL 9 with the same error.
Note: I have
use_proxy = true
. Setting it to false gives another error that has been reported here by others:Next authentication method: publickey\r\ndebug1: Trying private key: /tmp/ansible-key1926188557\r\nLoad key \"/tmp/ansible-key1926188557\": error in libcrypto\r\ndebug2: we did not send a packet, disable method\r\ndebug1: No more authentication methods to try.\r\[email protected]: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).", vsphere-iso.rhel8-cis1: "unreachable": true
Reproduction Steps
Create a RHEL 8 or 9 machine with Packer in my environment using vsphere.iso and the ansible provisioner.
The ansible provisioner will fail.
Plugin and Packer version
1.9.1
Simplified Packer Buildfile
provisioner "ansible" {
ansible_ssh_extra_args = [ "-oHostKeyAlgorithms=+ssh-rsa -oPubkeyAcceptedKeyTypes=+ssh-rsa" ]
playbook_file = "../ansible/fix_firewalld.yml"
user = "${local.ssh_username}"
extra_arguments = [ "--extra-vars", "ansible_become_pass=${var.new_ssh_pass}", "-vvvv" ]
sftp_command = "/usr/libexec/openssh/sftp-server -e"
use_proxy = true
}
Operating system and Environment details
$ ansible-playbook --version
ansible-playbook [core 2.14.6]
config file = None
configured module search path = ['/home/username/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/username/.local/lib/python3.9/site-packages/ansible
ansible collection location = /home/username/.ansible/collections:/usr/share/ansible/collections
executable location = /home/username/.local/bin/ansible-playbook
python version = 3.9.16 (main, Dec 8 2022, 00:00:00) [GCC 11.3.1 20221121 (Red Hat 11.3.1-4)] (/usr/bin/python3)
jinja version = 3.1.2
libyaml = True
$ packer --version
1.9.1
$ cat /etc/redhat-release
Rocky Linux release 9.2 (Blue Onyx)
Log Fragments and crash.log files
https://gist.github.com/joubbi/1190b2c1499d7bc9917261f11128bfb0
The text was updated successfully, but these errors were encountered: