0

I have a series of lab linux server (centos/rh) that are built using an automated PXE install via kickstart file. I would like to use another automated process (ansible) to monitor when the installations have completed. Normally I would use a simple tool like ping but these servers can only be accessed remotely through an internal proxy.

One idea was to add httpd and a simple index.html page via the kickstart, then use curl to loop over requesting the page. While this will work, it seems pretty heavy for such a simple check and then requires the extra step of removing all this baggage afterwards.

I understand that ping can't operate at this level in the stack, but is there a way to accomplish something like:

ping labhost --proxy 192.168.0.2:3128
dranobob
  • 151
  • 5

1 Answers1

0

Allow ssh from the host running Ansible to the new instance. Either directly routed, or through something like a ssh bastion in front of it with ProxyJump. You will need to know an initial credential, so install a ssh key with the kickstart.

Add the host to inventory and run a play on it. wait_for_connection module will attempt to connect to it several times. The play will need gather_facts: False to skip the implicit gathering of host information, as it is not reachable to start.

Ansible's ping module is not ICMP echo. It remotes into the box, ssh by default, and gets a simple response back.


ICMP is a feature of IP, at a different layer than TCP or UDP. Does not make much sense to proxy an ICMP packet beyond where an IP packet would go.

John Mahowald
  • 32,050
  • 2
  • 19
  • 34