[ Ansible ] DEPRECATION WARNING 해결 방법

2024. 8. 22. 14:40·🌥️Cloud Study🌥️/TroubleShooting

요약 : 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
'🌥️Cloud Study🌥️/TroubleShooting' 카테고리의 다른 글
  • [ Jenkins ] 파이프라인 배포 : No such file or directory
  • [ Prometheus ] active failed 오류 해결
  • [ NHN Cloud ] 파이프라인 배포 문제 해결 - 2 (502 Bad Gateway)
  • [ NHN Cloud ] 파이프라인 배포 문제 해결
L_Chae
L_Chae
🎮😻🤓🖥✨
  • L_Chae
    Cherish
    L_Chae
  • 전체
    오늘
    어제
    • 분류 전체보기
      • 🌥️Cloud Study🌥️
        • AWS
        • NHN
        • KT
        • Microsoft (Azure 900)
        • TroubleShooting
        • IaC
        • Etc
      • STUDY
        • English
        • Japanese
        • 개인정보보호 관련
      • 초등학교 AI 교육 진행
        • 2024학년도 1학년-2학년
        • 2025학년도 4학년
      • 2024 KDT 📕
        • Lecture
        • Study 📗
        • Study-JAVA
        • Project
        • etc
      • INTERLUDE ✦
        • 2022 SYSTEM STUDY
        • 2022 Winter Study
        • 2023 AutoMobility STUDY
        • 2023 Summer Study (CPPG)
        • 2023 Reversing STUDY
        • etc
      • Private🔒
        • MacBook 💻
        • Screenshot 🩷
        • Photo 🖼️
        • FFXIV - Backup 🎮
        • Tistory
      • PBL 📗
        • 논문 스터디
        • Backup
      • Project 🖤
        • 2022-2) 개인정보보호 소학회
        • 2022-2) winter GURU2 - iOS
        • 2023-1) PBL 3
        • 2023-2) PBL 4
        • 2024-1) SW-AI교육 실습 일지
      • CTF 🚩
        • 2022
        • 2023
      • News scrap 📰
        • 2022
        • 2023
      • 2022 공부 로그 🐯
      • 2023 공부 로그🐰
  • 블로그 메뉴

    • 글쓰기
    • 홈
    • 태그
    • 방명록
  • 링크

  • 공지사항

  • 인기 글

  • 태그

    JLPT N1
    JLPT
    N1
    멱등성
    ansible
    jlpt n1 도전기
    deprecation warning
    ansible galaxy
    content collection
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.3
L_Chae
[ Ansible ] DEPRECATION WARNING 해결 방법
상단으로

티스토리툴바