linux - Ansible "missing become password" on one machine but not another -
the situation this: machine on target machine b, run below shell code , completes successfully. machine on target machine c, run below shell code , gives me "become password missing". can log both machine , b credentials without being prompted sudo password or anything.
i go ansible.cfg , uncomment ask_sudo_pass , causes code prompt me sudo password request. however, want automate dozens of machines, can't enter sudo password every 1 every time use this. i'm in process of setting ssh keys these machines, there's been delays there need way automate in short term. suggestions please?
these shell commands i'm using:
export ansible_host_key_checking=false sshpass -p ${ssh_password} ansible-playbook -i hosts site.yml -u ${ssh_username} --extra-vars="ssh_user=${ssh_username}"
i remove password of user on target
passwd --delete username
and rely on id_rsa connect, of course "username" on target part of wheel group.
you can try edit sudoers file , add this
your_username all=(all) nopasswd:
hope helps,
Comments
Post a Comment