runtime.yml 729 B

123456789101112131415161718192021222324252627
  1. ---
  2. - name: Check if etcd service exists
  3. systemd:
  4. name: "etcd"
  5. ignore_errors: true
  6. register: etcd_service
  7. - name: Set runtime to host
  8. set_fact:
  9. r_etcd_common_etcd_runtime: host
  10. when: etcd_service.status.ActiveState == 'active'
  11. - name: Check if etcd service exists
  12. systemd:
  13. name: "etcd_container"
  14. ignore_errors: true
  15. register: etcd_container_service
  16. - name: Set runtime to docker
  17. set_fact:
  18. r_etcd_common_etcd_runtime: docker
  19. when: etcd_container_service.status.ActiveState == 'active' and not l_is_etcd_system_container
  20. - name: Set runtime to runc
  21. set_fact:
  22. r_etcd_common_etcd_runtime: runc
  23. when: etcd_container_service.status.ActiveState == 'active' and l_is_etcd_system_container