# inventory 파일 [web] tnode1-centos.exp.com tnode2-ubuntu.exp.com [all] tnode1-centos.exp.com tnode2-ubuntu.exp.com tnode3-rhel.exp.com
# ansible web -m sheel -a "uptime" or # ansible all -m sheel -a "uptime"
실행은 되나 아래와 같은 에러가 남 - host 중에 ubuntu 에서 에러남
[DEPRECATION WARNING]: Distribution Ubuntu 18.04 on host tnode2-ubuntu.exp.com 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.
[지원 중단 경고]: 호스트 tnode2-ubuntu.exp.com의 배포 Ubuntu 18.04는 /usr/bin/python3을 사용해야 하지만 이전 Ansible 릴리스와의 하위 호환성을 위해 /usr/bin/python을 사용하고 있습니다. 향후 Ansible 릴리스에서는 기본적으로 이 호스트에 대해 검색된 플랫폼 Python을 사용하게 됩니다. 자세한 내용은 https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html을 참조하세요. 이 기능은 버전 2.12에서 제거됩니다. ansible.cfg에서 deprecation_warnings=False를 설정하여 사용 중단 경고를 비활성화할 수 있습니다.
# 조치
# python2와 python3 을 공통으로 맞추고 --> 맞추는 방법 https://hwpform.tistory.com/67 Ansible - 05 (python3 설정) 참조
# inventory 파일 아래 추가 ansible_python_interpreter=/usr/bin/python3
# 다시실행 # ansible all -m ping --> tnode1번에서 다시 오류가 남 (원인 tnode1에 python3가 설치가 안되어 있음) # tnode1번 서버에서 python3 설치 # 다시실행 # ansible all -m ping