우선 구글에다가 ansible awx 설치 하면 거의 99프로는 https://github.com/ansible/awx.git 요거 설치하는게 나온다.

저걸로 설치하면 에러가 발생한다. 아래처럼..

 

TASK [local_docker : Start the containers] *********************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Failed to import docker or docker-py - cannot import name __version__. Try `pip install docker` or `pip install docker-py` (Python 2.6)"}

 

이런 에러가 난다.

 

구글링 해보면 많이 나온다. 뭐 pip install docker 해보고 언인스톨 했다가 yum 으로 다시 설치 해보고 compose 버전 지정해서 설치 해보고.... 계속 에러가 난다.

 

ansible 에러가 아니고 docker 컨테이너 실행이 안되는거니까.. 하나하나 찾아보면

 

우선.. 에러나는 task가 

- name: Start the containers
  docker_service:
    project_src: "{{ docker_compose_dir }}"
    restarted: "{{ awx_compose_config is changed or awx_secret_key is changed }}"
  register: awx_compose_start

 

위 부분이다. 

 

docker_service 라는 모듈은 말 그대로 docker 서비스, 컨테이너를 관리하는 모듈인데 뭐 최신버전(ansible 2.8)은 docker_service라는 모듈 대신에 docker_compose를 사용하라고 한다. 

(https://docs.ansible.com/ansible/latest/modules/docker_service_module.html 참고)

하... 설치 잘된다..

 

이렇게 쉬운거였다니 ;;;;;; 어이가 없네 진자............ 역시 구글링 백날 해봐야 공식 docs 가 최고인것같다.

'job > ansible' 카테고리의 다른 글

ansible - windows Win32ErrorCode 1058  (0) 2019.05.23
windows host에서 ansible 실행하는법  (0) 2019.05.23
ansible 공부한 모듈들 정리  (0) 2019.05.02
ansible - 디렉토리 구조  (0) 2019.05.02
ansible- error  (0) 2019.04.26

+ Recent posts