mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-01-25 02:38:42 +08:00
16 lines
676 B
YAML
16 lines
676 B
YAML
|
- name: Install this role on {{ansible_os_family}}
|
||
|
include: "{{ansible_os_family}}.yml"
|
||
|
|
||
|
# display os version and image name
|
||
|
- name: Display os version
|
||
|
shell: sudo echo "System version:" "{{ansible_distribution}}" "{{ansible_distribution_version}}" |sudo tee -a /data/logs/install_version.txt
|
||
|
|
||
|
- name: Display image name
|
||
|
shell: sudo echo "Image name:" "{{image}}" |sudo tee -a /data/logs/install_version.txt
|
||
|
when: image is defined and image is not none
|
||
|
|
||
|
- name: Check Docker Container Service
|
||
|
shell: docker ps --format \{\{'json .'\}\}| jq -s map\(\{containername:'.Names',state:'.State'\}\)
|
||
|
register: check_container_service
|
||
|
notify: check_container_service
|