Featured image of post 【Ansible備忘録】Failed to set permissions on the temporary files Ansible needs to create when becoming an unprivileged userの対処方法

【Ansible備忘録】Failed to set permissions on the temporary files Ansible needs to create when becoming an unprivileged userの対処方法

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

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