Is there anyway to adjust ansible to use an account with passwordless sudo?
yes.
but for a useful answer, you might want to be more specific and add some context to the question.
I’ve created a set of plays that will deploy all of my applications to all environments, and it works great.
I’m trying to have our build server run the play when builds are completed, however I’m running into TTY issue where sudo is required. I’ve created a general account for ansible to use and it’s limited on the systems in such a way that it cannot effect anything but the deployed applications. I use my user account to handle provisioning/infrastructure side of plays.
There are lot of options in what bamboo can do when the build is completed, but I figured installing ansible on the machine and just running the playbook command was going to be the easiest as I can pass some bamboo variables to the extra_vars of the play.
so I suggest not having "sudo_ask_pass: True" in your plays, "sudo: True"
is fine, set you bamboo user with NOPASWORD in the sudoers files and just
remember to always use -K when executing manually.