Ansibleの私の在庫

Ansibleの私の在庫

独自のマニフェストを作成し、3つのIPアドレスのうち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'

おすすめ記事