728x90
반응형
Missing sudo password 에러 해결방법
#  Ansible 플레이북 실행했을때 다음과 같은 메시지가 나올경우
# 실행계정은 cumulus 이다

192.168.56.61
192.168.56.62
192.168.56.63
192.168.56.64

fatal: [192.168.56.63]: FAILED! => {"msg": "Missing sudo password"}
fatal: [192.168.56.64]: FAILED! => {"msg": "Missing sudo password"}

 

$ 실행계정이 root가 아니고 cumulus 계정이다.

$ ansible-playbook test.yml -k
SSH password:

PLAY [Change the hostname] **************************************************************************************

TASK [lldp service restart] *************************************************************************************
fatal: [192.168.56.64]: FAILED! => {"msg": "Missing sudo password"}
fatal: [192.168.56.63]: FAILED! => {"msg": "Missing sudo password"}
[WARNING]: Platform linux on host 192.168.56.62 is using the discovered Python interpreter at /usr/bin/python,
but future installation of another Python interpreter could change this. See
https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html for more information.
changed: [192.168.56.62]
[WARNING]: Platform linux on host 192.168.56.61 is using the discovered Python interpreter at /usr/bin/python,
but future installation of another Python interpreter could change this. See
https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html for more information.
changed: [192.168.56.61]

PLAY RECAP ******************************************************************************************************
192.168.56.61              : ok=1    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=                                                                                                                      0
192.168.56.62              : ok=1    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=                                                                                                                      0
192.168.56.63              : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=                                                                                                                      0
192.168.56.64              : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=                                                                                                                      0

 

해결방법 

 

$ 해당 서버에 접속한다, 에러가난 192.168.56.53, 192.168.56.54 번

# root로 접속

# vi /etc/sudoers

cumulus ALL=(ALL) NOPASSWD: ALL   <--- 추가

 

 

728x90
반응형
LIST

'Ansible' 카테고리의 다른 글

Ansible - 10 (명령어)  (0) 2023.12.31
Ansible - 09 (ansible 실행 오류 조치)  (0) 2023.12.30
Ansible - 10 (명령어)  (0) 2023.12.29
Ansible - 08 (rols 설치)  (1) 2023.12.23
Ansible - 07 (실습하기 좋은 Vagrant 파일)  (2) 2023.12.23

+ Recent posts