LoginSignup
9
9

More than 5 years have passed since last update.

Ansible の unarchive で No such file or directory

Posted at

概要

unarchive モジュールを使う playbook を実行する際の
No such file or directory エラー対処

playbook のエラー箇所

- name: copy src
  unarchive: src=hoge.tar.gz dest=/usr/local/src/

エラー内容

fatal: [ono1]: FAILED! => {"changed": false, "failed": true, 
"msg": "Unexpected error when accessing exploded file: 
[Errno 2] そのようなファイルやディレクトリはありません: '/usr/local/src/hoge'"}

解決策(暫定対応)

environment に LANG: C, LC_ALL: C, LC_MESSAGES を追加

  unarchive: src=hoge.tar.gz dest=/usr/local/src/
  environment:
    LANG: C
    LC_ALL: C
    LC_MESSAGES: C

その他

アップデートで対応されているらしい??

自分のは 2.1.0.0 だけど直ってない場合があるのかも。

# ansible --version
ansible 2.1.0.0
  config file = /home/ono/ansible/ansible.cfg
  configured module search path = Default w/o overrides
9
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
9