-
Notifications
You must be signed in to change notification settings - Fork 23.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cask installs that require a password fail #29403
Comments
From @edrozenberg on 2016-11-10T01:31:53Z Found that the issue has been discussed on homebrew cask, puppet, chef projects already: Some suggestions are to use sudo, but that would make the entire app owned by root instead of the regular user. Not sure if the issue needs to be tackled by the Ansible cask module or the homebrew cask project. |
From @ansibot on 2016-11-10T01:31:53Z @indrajitr, ping. This issue is waiting on your response. |
From @bcg62 on 2016-11-10T01:31:53Z |
From @rqelibari on 2016-11-10T01:31:53Z You can currently circumvent this by doing it like this:
What this actually does is nothing else then |
It looks like this workaround won't help when, for example installing java on a slower network connection - the sudo from the first call would timeout and ask a password when download finishes and |
A few years later I've finally tackled this and found a solution via the use of a SUDO_ASKPASS env var now supported by Homebrew. No other approaches have worked. Solution posted at: |
By using a hideous pre-ansible hook, due to ansible/ansible#29403
I'm currently looking into the issue. Once #13620 is merged into devel, that should do the trick. All you would need to do once that happens is add a |
Can everyone who still has this issue run a |
* Fixes #29403: homebrew_cask: Add SUDO_ASKPASS to module.run_command * homebrew_cask: refactor sudo_password code * homebrew_cask: more refactoring * homebrew_cask: use %s instead of string addition
* Fixes ansible#29403: homebrew_cask: Add SUDO_ASKPASS to module.run_command * homebrew_cask: refactor sudo_password code * homebrew_cask: more refactoring * homebrew_cask: use %s instead of string addition
From @edrozenberg on 2016-11-10T01:31:53Z
ISSUE TYPE
COMPONENT NAME
homebrew_cask
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
macOS Sierra 10.12.1 (16B2555)
One mac (controller) controlling another mac (minion) using normal ssh connection with ssh key.
SUMMARY
Some homebrew casks ask for a password during the installation process. It appears the ansible module does not provide a way to collect a password and pass it to the homebrew cask installer.
Currently, these casks that require a password need to be manually installed using 'brew cask install at the command line. Ansible cannot install them.
Found two casks so far that failed to install with Ansible, but work fine when done manually: microsoft-office and wireshark
STEPS TO REPRODUCE
EXPECTED RESULTS
wireshark cask and microsoft-office casks are installed
ACTUAL RESULTS
Copied from original issue: ansible/ansible-modules-extras#3415
The text was updated successfully, but these errors were encountered: