Ansible의 내 인벤토리

Ansible의 내 인벤토리

나만의 매니페스트를 만들고 IP 주소 3개 중 2개를 추가했지만 아래 명령을 실행할 때 오류가 발생합니다. 조언을 부탁드립니다.

ansible all -i myinventory -m command -a 'Free'

실수:

[DEPRECATION WARNING]: Distribution Ubuntu 18.04 on host 172.31.35.222 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.
172.31.35.222 | FAILED | rc=2 >>
[Errno 2] No such file or directory
[DEPRECATION WARNING]: Distribution Ubuntu 18.04 on host 172.31.37.140 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.
172.31.37.140 | FAILED | rc=2 >>
[Errno 2] No such file or directory

ansile.cfg에서 deprecation_warnings 설정을 변경하려고 시도했지만 여전히 이 오류가 발생합니다.

답변1

Free유효한 명령은 아니지만 free작동합니다. 단순한 오타!

이 시도:

ansible all -i myinventory -m command -a 'free'

명령 모듈을 지정할 필요도 없습니다(Linux의 경우).

ansible all -i myinventory -a 'free'

관련 정보