Update roles/build_fastapi/tasks/main.yml
This commit is contained in:
@@ -28,23 +28,3 @@
|
|||||||
path: "{{ build_root_abspath }}"
|
path: "{{ build_root_abspath }}"
|
||||||
pull: false
|
pull: false
|
||||||
tag: "{{ demobackend_version }}"
|
tag: "{{ demobackend_version }}"
|
||||||
- name: run docker
|
|
||||||
community.docker.docker_container:
|
|
||||||
name: demobackend
|
|
||||||
state: started
|
|
||||||
recreate: yes
|
|
||||||
image: "helloworld-fastapi:{{ demobackend_version }}"
|
|
||||||
ports:
|
|
||||||
- "8080:8080"
|
|
||||||
- name: wait for the api ready
|
|
||||||
wait_for:
|
|
||||||
host: 0.0.0.0
|
|
||||||
port: 8080
|
|
||||||
delay: 10
|
|
||||||
- name: testing api locally
|
|
||||||
shell: "curl -k localhost:8080"
|
|
||||||
register: reg_curl_result
|
|
||||||
- name: show curl result
|
|
||||||
debug:
|
|
||||||
msg: "{{ reg_curl_result.stdout }}"
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user