#53 standard-inventory-qcow2: contact vm with raw ping
Merged 6 years ago by merlinm. Opened 6 years ago by larsu.
Unknown source raw-ping  into  master

@@ -194,7 +194,9 @@

                  inventory,

                  image,

                  "--module-name",

-                 "ping"

+                 "raw",

+                 "--args",

+                 "/bin/true"

              ]

  

              (pid, ret) = os.waitpid(proc.pid, os.WNOHANG)

Some cloud images (including Fedora) don't have python2 installed. A
common pattern to use them from ansible is to install python2 with the
raw module before doing anything else.

Also use the raw module to ping the virtual machine, so that these
images can be used with this inventory script as well.

This sounds like a very reasonable idea. I have tested this successfully using the Fedora-Atomic-25-20170705.0.x86_64.qcow2 and Fedora-Atomic-26-20170821.0.x86_64.qcow2 images--as well as CentOS-7-x86_64-GenericCloud-1708.qcow2 image.

LGTM.

Pull-Request has been merged by merlinm

6 years ago
Metadata