내가 ansible와 함께 ECS 서비스를 삭제하려고와 ECS 서비스를 삭제 :노하우 ansible
- name: Delete the Service
ecs_service:
name: "{{ service_name }}"
cluster: "{{ cluster_name }}"
state: absent
그것은 실패 :
이An error occurred (InvalidParameterException) when calling the DeleteService operation: The service cannot be stopped while the primary deployment is scaled above 0.
그래서 솔루션이 "desired_count"로 설정하는 것입니다 0을 삭제하십시오. 그런데 어떻게 그 일을 할 수 있니? 또는 실행중인 ecs 서비스를 안전하게 삭제하는 올바른 방법은 무엇입니까? ecs_service : 이름 : 테스트 샘플 앱 서비스 작업 :
아마도 'ecs_service_facts'를 사용하여 서비스가 존재하는지, desired_count와 현재 카운트가 무엇인지를 결정한 다음 조건이 충족되지 않았 으면 0으로 설정합니다. 'ecs_service' 모듈이 자동으로 카운트 다운을 기다리지 않으면 카운트가 0이 될 때까지'until' 루프에서'ecs_service_facts'를 다시 사용하고'ecs_service'로 상태를 부재로 설정하십시오 – smiller171
그렇습니다. 이것을 ecs_service 모듈에서 버그라고 부르면 자동으로 모든 작업을 수행 할 수있는 pull 요청의 이점이 있습니다. – smiller171