by shigemk2

当面は技術的なことしか書かない

boto3 required for this module

boto3 required for this module

環境

  • hosts localhost
  • s3_sync
  • ansible-playbook 2.4.1.0
  • Python 3.6.2
  • Ubuntu 17.10
  • pyenv 1.1.5-40-g5b5df15

概要

この状況で表題のようなエラーが出る

これはインベントリファイルの問題

[targets]
localhost

って書いたら、デフォルトのPythonを認識する(/usr/bin/pythonかな)ので、pyenvでPythonを使う場合は ansible_python_interpreter でpyenvのPythonのパスを指定しなければならない。

[targets]
localhost ansible_connection=local ansible_python_interpreter=/path/to/.pyenv/shims/python