Closed behrangsa closed 7 years ago
Is there a way to temporary downgrade to 2.2.x?
If you haven't yet run brew cleanup
you should be able to simply brew switch ansible 2.3.1.0
.
Unfortunately it is too late. :(
IMHO this formula should be converted into ansible@2.2.rb and added to the core: https://raw.githubusercontent.com/Homebrew/homebrew-core/2da35c549a8e273ad3e421b7b2e8a94ff3ab04fa/Formula/ansible.rb.
Well, if you're feeling particularly dedicated you could:
brew rm ansible
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/2da35c549a8e273ad3e421b7b2e8a94ff3ab04fa/Formula/ansible.rb
brew pin ansible
I suspect that would work. You'd have to remember to unpin
it at some point, presuming you ever wanted it upgraded again, but otherwise.
What's peculiar is that paramiko
is still very much part of the ansible
formula, so perhaps the "real" issue here is that upstream has a silently-pinned dependency or something and is rejecting 2.2.1
as a valid paramiko
. But it's strange nobody else has complained yet IIRC; ansible
is pretty popular. Hmm.
I have a feeling this will only occur if the brew installation is relatively new. A couple of weeks ago our help desk re-imaged my machine so I had to re-install home-brew again.
In the first few days it was working fine but today I needed to run it again locally and it started failing.
Thanks for the tip above. It fixed my problem. I will create a PR for the 2.2.x version later today.
Cheers.
Probably not going to add a 2.2 if it's just because 2.3 is misbehaving, which should be fixed not papered over. But I'm skeptical it's actually broken given
Josephs-MacBook-Pro:~ joe$ brew formula-analytics ansible
install events in the last 30 days for ansible
=====================================================================================================
1 | ansible | 17,462 | 99.82%
2 | ansible --HEAD | 32 | 0.18%
=====================================================================================================
Total | 17,494 | 100%
=====================================================================================================
and this is the only issue report we've had.
In https://github.com/Homebrew/homebrew-core/pull/16902 parmiko was upgraded from 2.1.2 to 2.2.1
resource "paramiko" do
- url "https://files.pythonhosted.org/packages/64/79/5e8baeedb6baf1d5879efa8cd012f801efc232e56a068550ba00d7e82625/paramiko-2.1.2.tar.gz"
- sha256 "5fae49bed35e2e3d45c4f7b0db2d38b9ca626312d91119b3991d0ecf8125e310"
+ url "https://files.pythonhosted.org/packages/d1/0b/c8bc96c79bbda0bcc9f2912389fa59789bb8e7e161f24b01082b4c3f948d/paramiko-2.2.1.tar.gz"
+ sha256 "ff94ae65379914ec3c960de731381f49092057b6dd1d24d18842ead5a2eb2277"
end
So you could try downgrading that.
Yup it's messed up:
iMac-TMP:2.3.2.0 joe$ . libexec/bin/activate
(libexec) iMac-TMP:2.3.2.0 joe$ which python
/usr/local/Cellar/ansible/2.3.2.0/libexec/bin/python
(libexec) iMac-TMP:2.3.2.0 joe$ python
Python 2.7.13 (default, Jul 18 2017, 09:16:53)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import paramiko
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/Cellar/ansible/2.3.2.0/libexec/lib/python2.7/site-packages/paramiko/__init__.py", line 31, in <module>
from paramiko.transport import SecurityOptions, Transport
File "/usr/local/Cellar/ansible/2.3.2.0/libexec/lib/python2.7/site-packages/paramiko/transport.py", line 57, in <module>
from paramiko.ed25519key import Ed25519Key
File "/usr/local/Cellar/ansible/2.3.2.0/libexec/lib/python2.7/site-packages/paramiko/ed25519key.py", line 17, in <module>
import bcrypt
ImportError: No module named bcrypt
>>>
(libexec) iMac-TMP:2.3.2.0 joe$ pip2 install bcrypt
Collecting bcrypt
Using cached bcrypt-3.1.3-cp27-cp27m-macosx_10_6_intel.whl
Requirement already satisfied: six>=1.4.1 in ./libexec/lib/python2.7/site-packages (from bcrypt)
Requirement already satisfied: cffi>=1.1 in ./libexec/lib/python2.7/site-packages (from bcrypt)
Requirement already satisfied: pycparser in ./libexec/lib/python2.7/site-packages (from cffi>=1.1->bcrypt)
Installing collected packages: bcrypt
Successfully installed bcrypt-3.1.3
(libexec) iMac-TMP:2.3.2.0 joe$ python
Python 2.7.13 (default, Jul 18 2017, 09:16:53)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import paramiko
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/Cellar/ansible/2.3.2.0/libexec/lib/python2.7/site-packages/paramiko/__init__.py", line 31, in <module>
from paramiko.transport import SecurityOptions, Transport
File "/usr/local/Cellar/ansible/2.3.2.0/libexec/lib/python2.7/site-packages/paramiko/transport.py", line 57, in <module>
from paramiko.ed25519key import Ed25519Key
File "/usr/local/Cellar/ansible/2.3.2.0/libexec/lib/python2.7/site-packages/paramiko/ed25519key.py", line 22, in <module>
import nacl.signing
ImportError: No module named nacl.signing
>>>
(libexec) iMac-TMP:2.3.2.0 joe$ pip2 install PyNaCl
Collecting PyNaCl
Using cached PyNaCl-1.1.2-cp27-cp27m-macosx_10_6_intel.whl
Requirement already satisfied: cffi>=1.4.1 in ./libexec/lib/python2.7/site-packages (from PyNaCl)
Requirement already satisfied: six in ./libexec/lib/python2.7/site-packages (from PyNaCl)
Requirement already satisfied: pycparser in ./libexec/lib/python2.7/site-packages (from cffi>=1.4.1->PyNaCl)
Installing collected packages: PyNaCl
Successfully installed PyNaCl-1.1.2
(libexec) iMac-TMP:2.3.2.0 joe$ python
Python 2.7.13 (default, Jul 18 2017, 09:16:53)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import paramiko
>>>
Missing bcrypt and PyNaCl.
This should fix it: https://github.com/Homebrew/homebrew-core/pull/17164
@behrangsa This should now be fixed.
brew update
brew unpin ansible
brew upgrade
@ilovezfs Ta for sorting this ❤️. Was going to take a look later today but wanted to sleep a bit, heh.
@ilovezfs thanks mate!
brew install
ing one, specific formula (not cask) and not every time you runbrew
? If it's a generalbrew
problem please file this issue at https://github.com/Homebrew/brew/issues/new. If it's abrew cask
problem please file this issue at https://github.com/Homebrew/caskroom/homebrew-cask/newbrew update
and retried your prior step?brew doctor
, fixed all issues and retried your prior step?brew gist-logs <formula>
(where<formula>
is the name of the formula that failed) and included the output link?brew gist-logs
didn't work: ranbrew config
andbrew doctor
and included their output with your issue?Please note we will close your issue without comment if you delete or do not fill out the issue checklist and provide ALL the requested information.
To help us debug your issue please explain:
Run an ansible playbook that was working until today (I hadn't ran it for a couple of weeks or so though).
I think a recent executing of
brew update/upgrade
had upgraded Ansible to 2.3.2.0 and since this morning I am getting this error message when I want to run the playbook:In the past the playbook was working without any problems. Also I have removed all previous installs of Ansible and there doesn't seem to be a way to downgrade to 2.2.x.
brew install
commands)