0

I tried to init

molecule init role mikitovcluster

got

molecule: command not found

I listed my collections

ansible-galaxy collection list

# /usr/lib/python3/dist-packages/ansible_collections
Collection                    Version
----------------------------- -------
amazon.aws                    5.4.0  
ansible.netcommon             4.1.0  
ansible.posix                 1.5.1  
ansible.utils                 2.9.0  
ansible.windows               1.13.0 
arista.eos                    6.0.0  

# /home/miki/.ansible/collections/ansible_collections
Collection           Version
-------------------- -------
ansible.posix        1.5.2  
ansible.utils        2.9.0  
community.general    6.5.0  
community.kubernetes 2.0.1  
community.molecule   0.1.0  
kubernetes.core      2.4.0  

Output ansible --version

ansible [core 2.14.4]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/miki/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  ansible collection location = /home/miki/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.10.6 (main, Mar 10 2023, 10:55:28) [GCC 11.3.0] (/usr/bin/python3)
  jinja version = 3.0.3
  libyaml = True

How it comes that I have two paths for my collections?

β.εηοιτ.βε
  • 33,893
  • 13
  • 69
  • 83
Richard Rublev
  • 7,718
  • 16
  • 77
  • 121
  • 2
    How are your Ansible collections relevant to a binary that should be available if you [pip installed the correct package](https://pypi.org/project/molecule/)? – β.εηοιτ.βε Apr 25 '23 at 07:32
  • @β.εηοιτ.βε Installed it already. You can check in my collections,but it is not detected. – Richard Rublev Apr 25 '23 at 07:40
  • 1
    molecule is not only an Ansible collection, it is a binary to start with. How did you install it? Either way, your question is about installing a software, which is not a on-topic question for SO. – β.εηοιτ.βε Apr 25 '23 at 07:41
  • @β.εηοιτ.βε With pip3,I followed your link. – Richard Rublev Apr 25 '23 at 07:42
  • @β.εηοιτ.βε pip3 install molecule,I double checked. Defaulting to user installation because normal site-packages is not writeable – Richard Rublev Apr 25 '23 at 07:46
  • I got the same with python3 -m pip install molecule. – Richard Rublev Apr 25 '23 at 07:48
  • 3
    Means the path to the binary is not in your user's path. Once again, this is not a programming question this is an issue in understanding how your package manager (pip) and your OS works to make binaries available to you. – β.εηοιτ.βε Apr 25 '23 at 07:50

0 Answers0