ansible-sshd icon indicating copy to clipboard operation
ansible-sshd copied to clipboard

Hangs on RHEL based systems when there is no internet connection

Open vdbe opened this issue 2 years ago • 3 comments

The task Install ssh packages hangs on RHEL based systems The packages in the list sshd_packages were present on the system(s) I think This is because it's trying to update the package cache

Tested on:

  • AlmaLinux 8
  • Fedora server 36
  • Ubuntu 20.04

vdbe avatar Oct 02 '22 14:10 vdbe

What would be the preferred way to fix this?

  • Adding when: sshd_packages|length>0 so that users can just set it to []
  • Adding an extra option
  • ...

I don't mind doing it myself once I know what is prefered

vdbe avatar Oct 02 '22 14:10 vdbe

Thank you for the report. The task "Install ssh packages" invokes ansible.builtin.package so I assume this hang happens inside of the standard module and there should be some timeout so I would consider reporting it to ansible.

For this role, we should probably have some way around this. Adding when: sshd_packages | length>0 sounds to me like a good solution, but I would like to wait for feedback from others before settling on some definite solution.

Jakuje avatar Oct 06 '22 08:10 Jakuje

IMO this should not be handled by the sshd role - it is something that should be configured when doing general system provisioning or configuration, or perhaps by using a special role/module to manage the packaging system on the remote system e.g. https://www.golinuxhub.com/2014/11/how-to-use-yum-locally-without-internet/

richm avatar Oct 06 '22 20:10 richm

I agree with @richm - this is a system wide setting that will impact other software installations too. If the host system cannot connect to the Internet it should not try.

mattwillsher avatar Oct 19 '22 07:10 mattwillsher