본문 바로가기
인프라/앤서블(Ansible)

[ansible] Failed to create temporary directory.In some cases, you may have been able to authenticate and did not have permissions on the target directory. Consider changing the remote tmp path in ansible.cfg to a path rooted in

by IT맥구리나스 2023. 2. 9.

개요

- ansible playbook 실행시 아래와 같은 오류를 해결할 수 있다.

UNREACHABLE! => {"changed": false, "msg": "Failed to create temporary directory.In some cases, you may have been able to authenticate and did not have permissions on the target directory. Consider changing the remote tmp path in ansible.cfg to a path rooted in \"/tmp\", for more error information use -vvv. Failed command was: ( umask 77 && mkdir -p \"` echo /home/test123/.ansible/tmp `\"&& mkdir \"` echo /home/test123/.ansible/tmp/ansible-tmp-1675833544.6-19488-55439220417658 `\" && echo ansible-tmp-1675833544.6-19488-55439220417658=\"` echo /home/test123/.ansible/tmp/ansible-tmp-1675833544.6-19488-55439220417658 `\" ), 
exited with result 1", "unreachable": true}

 

해결방법

- 서버에 test123계정의 홈디렉터리가 없는 경우 다음과 같은 에러가 발생

- /home/test123 생성

- chown -R test123.test123 /home/test123 소유자 변경

- 계정패스워드가 만료되어 안되는 경우임 이경우, chage -M 99999 계정명 으로 패스워드 만료일자 제한해제한다.

반응형

댓글