123456789101112131415161718192021222324252627 |
- ---
- - name: Check if etcd service exists
- systemd:
- name: "etcd"
- ignore_errors: true
- register: etcd_service
- - name: Set runtime to host
- set_fact:
- r_etcd_common_etcd_runtime: host
- when: etcd_service.status.ActiveState == 'active'
- - name: Check if etcd service exists
- systemd:
- name: "etcd_container"
- ignore_errors: true
- register: etcd_container_service
- - name: Set runtime to docker
- set_fact:
- r_etcd_common_etcd_runtime: docker
- when: etcd_container_service.status.ActiveState == 'active' and not l_is_etcd_system_container
- - name: Set runtime to runc
- set_fact:
- r_etcd_common_etcd_runtime: runc
- when: etcd_container_service.status.ActiveState == 'active' and l_is_etcd_system_container
|