runtime.yml 925 B

1234567891011121314151617181920212223242526272829303132
  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' and not l_is_etcd_system_container
  11. - name: Set runtime to runc
  12. set_fact:
  13. r_etcd_common_etcd_runtime: runc
  14. when: etcd_service.status.ActiveState == 'active' and l_is_etcd_system_container
  15. - name: Check if etcd service exists
  16. systemd:
  17. name: "etcd_container"
  18. ignore_errors: true
  19. register: etcd_container_service
  20. - name: Set runtime to docker
  21. set_fact:
  22. r_etcd_common_etcd_runtime: docker
  23. when: etcd_container_service.status.ActiveState == 'active' and not l_is_etcd_system_container
  24. - name: Set runtime to runc
  25. set_fact:
  26. r_etcd_common_etcd_runtime: runc
  27. when: etcd_container_service.status.ActiveState == 'active' and l_is_etcd_system_container