Featured image of post Ansibleの「Failed to set permissions on the temporary files」の対処

Ansibleの「Failed to set permissions on the temporary files」の対処

Ansibleのplaybook実行時に「Failed to set permissions on the temporary files Ansible needs to create」が出たときの対処法。ansible.cfgに設定を追記するだけで回避できます。備忘録です。

231文字

Playbook実行時に謎のエラーが

いつも通りAnsibleにてプレイブックを実行していると以下のようなエラーが発生しました。

Error Log
fatal: [127.0.0.1]: FAILED! => {
  "msg": "Failed to set permissions on the temporary files Ansible needs to create when becoming an unprivileged user (rc: 1, err: chown: `/tmp/ansible-tmp-1524573884.53-191197441027150/' の所有者を変更中: 許可されていない操作です
                 chown: `/tmp/ansible-tmp-1524573884.53-191197441027150/command.py' の所有者を変更中: 許可されていない操作です
  }).
  For information on working around this, see https://docs.ansible.com/ansible/become.html#becoming-an-unprivileged-user"
}

何ぞこれ・・・。orz

ansible.cfgで解決

こちらはansible.cfg以下を追記すれば回避することが可能になります。

ansible.cfg
[ssh_connection]
pipelining = true

誰かの助けになるように備忘録として記事にしておきます。