요약 : Python 3를 사용하도록 설정해주자
# ansible 명령어 실행 시 경고 메시지
[DEPRECATION WARNING]: Distribution ubuntu 20.04 on host 192.168.2.53 should use /usr/bin/python3, but is using
/usr/bin/python for backward compatibility with prior Ansible releases. A future Ansible release will default to using
the discovered platform python for this host. See
https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html for more information. This feature
will be removed in version 2.12. Deprecation warnings can be disabled by setting deprecation_warnings=False in
ansible.cfg.
Ansible이 기본적으로 `/user/bin/python`을 사용하도록 설정되어 있는데,
Ansible은 Python 3을 사용하는 것을 권장한다는 내용
해결 방법
Ansible 구성 파일(ansible.cfg) 수정
# 파일 위치
/etc/ansible/ansible.cfg
# 수정 사항
[defaults]
interpreter_python = /usr/bin/python3
# Python 버전 확인
python --version
# Python 설치 경로 확인
which python(버전명)
`ansible.cfg` 파일에서 `interpreter_python` 설정을 추가하여 python 3을 사용하도록 지정한다.
Deprecation Warning 비활성화
[defaults]
deprecation_warnings = False
만약 위 경고를 무시하고 싶다면 `ansible.cfg` 파일에 `deprecation_warning=False` 설정을 추가하면 된다.
'🌥️Cloud Study🌥️ > TroubleShooting' 카테고리의 다른 글
[ Jenkins ] 파이프라인 배포 : No such file or directory (0) | 2024.08.21 |
---|---|
[ Prometheus ] active failed 오류 해결 (0) | 2024.08.09 |
[ NHN Cloud ] 파이프라인 배포 문제 해결 - 2 (502 Bad Gateway) (0) | 2024.08.08 |
[ NHN Cloud ] 파이프라인 배포 문제 해결 (0) | 2024.08.08 |
오류 : Web server failed to start. Port 8080 was already in use. (0) | 2024.07.24 |