]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
testnode: Write sentinel file after container-host role 626/head
authorDavid Galloway <dgallowa@redhat.com>
Thu, 20 May 2021 16:01:29 +0000 (12:01 -0400)
committerDavid Galloway <dgallowa@redhat.com>
Thu, 20 May 2021 16:28:02 +0000 (12:28 -0400)
Now that we're running the entire cephlab.yml playbook during Cobbler kickstart, the sentinel file is getting touched while the container-host playbook is still running.

This change will still write the /ceph-qa-ready sentinel file during the testnodes role if the testnodes role got called directly

Signed-off-by: David Galloway <dgallowa@redhat.com>
cephlab.yml
roles/testnode/tasks/main.yml

index 0cb6884f0f6db4dbce9decc40c4b5bfb8fd73e68..ecd5830845b3aefcc4b98ee1a73725792f2ef3c9 100644 (file)
@@ -7,6 +7,11 @@
 # if this node is in the teuthology group, configure it
 - import_playbook: teuthology.yml
 
+- hosts: testnodes
+  tasks:
+    - set_fact:
+        ran_from_cephlab_playbook: true
+
 # if this node is in the testnode group, configure it
 - import_playbook: testnodes.yml
 
 
 # if this node is in the pulpito group, configure it
 - import_playbook: pulpito.yml
+
+# Touch a file to indicate we are done. This is something chef did;
+# teuthology.task.internal.vm_setup() expects it.
+- hosts: testnodes
+  become: true
+  tasks:
+    - name: Touch /ceph-qa-ready
+      file:
+          path: /ceph-qa-ready
+          state: touch
+      when: ran_from_cephlab_playbook|bool
index 9fa1fb66dff9d47d99716802cc253819dd5b8901..2cc28887cd7dc359c6568287b102564d334afea3 100644 (file)
   file:
       path: /ceph-qa-ready
       state: touch
+  when: (ran_from_cephlab_playbook is undefined or not ran_from_cephlab_playbook|bool)