728x90
728x170

fatal: [node1]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Warning: Permanently added '192.168.0.92' (ECDSA) to the list of known hosts.\r\nkjun@192.168.0.92: Permission denied (publickey,password).", "unreachable": true}

위와 같이 오류가 난 경우 --extra-vars 를 이용해 password 를 인자로 넘겨주면 됩니다.


ansible-playbook -i inventory/mycluster/inventory.ini -become --become-user=root cluster.yml --extra-vars "ansible_sudo_pass=1234qwer"


참고
https://stackoverflow.com/questions/25582740/missing-sudo-password-in-ansible

 

Missing sudo password in Ansible

Ansible asks for sudo password from following code, it tries to create a new postgres user. Error message: fatal: [xxx.xxx.xxx.xxx] => Missing sudo password main.yml - name: 'Provision a Post...

stackoverflow.com

 

728x90
그리드형
Posted by kjun
,