Installing adobe-air with ansible


(Arngmc) #1

Hello,

I have a little problem to install adobe-air with ansible because brew launch this command:
/usr/bin/sudo -E – env PATH=/usr/local/bin:/usr/local/sbin:/usr/local/Homebrew/Library/Homebrew/shims/scm:/usr/bin:/bin:/usr/sbin:/sbin /usr/local/Caskroom/adobe-air/31.0.0.96/Adobe AIR Installer.app/Contents/MacOS/Adobe AIR Installer -silent

So the task is asking the password via prompt…

For testing purpose I modified my /etc/sudoers file to permit my ansible user to execute "sudo env“ without password but that may cause a lot of security problems.

Is there somebody can help me to find a solution ?

Thank you in advance !


(Sean Molenaar) #2

Casks generally need to install as root as they just use the system installer. Maybe ansible has a better way to answer a sudo prompt?


(Arngmc) #3

Thank you for the answer, yes there is an module called “expect” but that seems not working with homebrew module.

So I used expect with command module to send directly brew commands.

I have a few issues to install some apps even when their installations are done, so I test the existence of the app in Caskroom folder just to be sure everything is ok.