{"action":"created","issue":{"url":"https://api.github.com/repos/puppetlabs/bolt/issues/163","repository_url":"https://api.github.com/repos/puppetlabs/bolt","labels_url":"https://api.github.com/repos/puppetlabs/bolt/issues/163/labels{/name}","comments_url":"https://api.github.com/repos/puppetlabs/bolt/issues/163/comments","events_url":"https://api.github.com/repos/puppetlabs/bolt/issues/163/events","html_url":"https://github.com/puppetlabs/bolt/issues/163","id":275502082,"number":163,"title":"Sudo password prompt","user":{"login":"zyronix","id":4386076,"avatar_url":"https://avatars1.githubusercontent.com/u/4386076?v=4","gravatar_id":"","url":"https://api.github.com/users/zyronix","html_url":"https://github.com/zyronix","followers_url":"https://api.github.com/users/zyronix/followers","following_url":"https://api.github.com/users/zyronix/following{/other_user}","gists_url":"https://api.github.com/users/zyronix/gists{/gist_id}","starred_url":"https://api.github.com/users/zyronix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zyronix/subscriptions","organizations_url":"https://api.github.com/users/zyronix/orgs","repos_url":"https://api.github.com/users/zyronix/repos","events_url":"https://api.github.com/users/zyronix/events{/privacy}","received_events_url":"https://api.github.com/users/zyronix/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-11-20T21:18:33Z","updated_at":"2017-11-21T00:33:19Z","closed_at":null,"author_association":"NONE","body":"Hi there,\r\n\r\nI just tried out the latest version of bolt and really great to see the sudo support! Currently it only works if you supply the sudo password through the commandline interface. I prefer to also have a password prompt for the sudo password (the same as it is now for the ssh password). I guess it would only require a couple of extra lines of code.\r\n\r\nCurrent lines of code for password\r\n```\r\n        opts.on('-p', '--password [PASSWORD]',\r\n                'Password to authenticate with (Optional).',\r\n                'Omit the value to prompt for the password.') do |password|\r\n          if password.nil?\r\n            STDOUT.print \"Please enter your password: \"\r\n            results[:password] = STDIN.noecho(&:gets).chomp\r\n            STDOUT.puts\r\n          else\r\n            results[:password] = password\r\n          end\r\nend\r\n```\r\nBut this is not there at the sudo_password field:\r\n\r\n```\r\n        opts.on('--sudo-password [PASSWORD]',\r\n                'Password for privilege escalation') do |password|\r\n          options[:sudo_password] = password\r\nend\r\n```\r\n\r\nThis would really be great if this can also be implemented :)"},"comment":{"url":"https://api.github.com/repos/puppetlabs/bolt/issues/comments/345877309","html_url":"https://github.com/puppetlabs/bolt/issues/163#issuecomment-345877309","issue_url":"https://api.github.com/repos/puppetlabs/bolt/issues/163","id":345877309,"user":{"login":"MikaelSmith","id":8162496,"avatar_url":"https://avatars0.githubusercontent.com/u/8162496?v=4","gravatar_id":"","url":"https://api.github.com/users/MikaelSmith","html_url":"https://github.com/MikaelSmith","followers_url":"https://api.github.com/users/MikaelSmith/followers","following_url":"https://api.github.com/users/MikaelSmith/following{/other_user}","gists_url":"https://api.github.com/users/MikaelSmith/gists{/gist_id}","starred_url":"https://api.github.com/users/MikaelSmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikaelSmith/subscriptions","organizations_url":"https://api.github.com/users/MikaelSmith/orgs","repos_url":"https://api.github.com/users/MikaelSmith/repos","events_url":"https://api.github.com/users/MikaelSmith/events{/privacy}","received_events_url":"https://api.github.com/users/MikaelSmith/received_events","type":"User","site_admin":false},"created_at":"2017-11-21T00:33:19Z","updated_at":"2017-11-21T00:33:19Z","author_association":"MEMBER","body":"Reproduced this, it just hangs if I pass `--sudo-password` without an argument and one is required."}}
{"actor":{"display_login":"MikaelSmith"}}