Re: [ansible-project] issue in installation of ansible

2022-02-04 Thread Kevin Y
there are two issues. first, after reinstalling, the issue is resolved,
second, correct command is "ansible --version". the reason that i used
"ansible --v" is it worked before. but after reinstalling, the command
cannot work
Thank all of you!!

On Fri, Feb 4, 2022 at 12:07 AM Vladimir Botka  wrote:

> On Thu, 3 Feb 2022 18:08:25 -0800 (PST)
> Kevin Y  wrote:
>
> > admin1@Le:~$ ansible -v
>
> The option '-v' means verbose. Try '--version' instead. You should
> see the paths (e.g. ansible 5.2.0 installed by *apt*)
>
> ansible python module location = /usr/lib/python3/dist-packages/ansible
>
>
> --
> Vladimir Botka
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAAYc07H4SBwpPHFugmHoQY%3DPTwnc3MQ1fLsW%3Dt_6DMtR9xSmvg%40mail.gmail.com.


Re: [ansible-project] issue in installation of ansible

2022-02-03 Thread Vladimir Botka
On Thu, 3 Feb 2022 18:08:25 -0800 (PST)
Kevin Y  wrote:

> admin1@Le:~$ ansible -v

The option '-v' means verbose. Try '--version' instead. You should
see the paths (e.g. ansible 5.2.0 installed by *apt*)

ansible python module location = /usr/lib/python3/dist-packages/ansible


-- 
Vladimir Botka

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/20220204060714.7f6d6a4d%40gmail.com.


pgp9IL4eptuy9.pgp
Description: OpenPGP digital signature


Re: [ansible-project] issue in installation of ansible

2022-02-03 Thread Vladimir Botka
On Thu, 3 Feb 2022 18:08:25 -0800 (PST)
Kevin Y  wrote:

> .. Ubuntu 
>
> $ sudo apt-get install ansible -y
> 
> admin1@Le:~$ ansible -v
> Traceback (most recent call last):
>   File "/usr/bin/ansible", line 44, in 
> from ansible import context
>   File "/usr/local/lib/python3.8/dist-packages/ansible/context.py", line 
> 18, in 
> from ansible.module_utils.common._collections_compat import Mapping, Set
> ModuleNotFoundError: No module named 'ansible.module_utils'

You're mixing *pip* and *apt* installation, I guess.

ansible 5.2.0, installed by *apt*, provides

  /usr/lib/python3/dist-packages/ansible/context.py
  
/usr/lib/python3/dist-packages/ansible/module_utils/common/_collections_compat.py

In Ubuntu 20.04, the packages ansible 5.2.0 and ansible-core 2.12.1,
installed by *apt*, put no files into the directory

  /usr/local/lib/python3.8/dist-packages

Instead, your *ansible*, probably installed by *pip*, is running

  /usr/local/lib/python3.8/dist-packages/ansible/context.py

, but 'ansible.module_utils' are missing in

  /usr/local/lib/python3.8/dist-packages/

The fastest solution would be probably to purge all *pip* and *apt*
ansible packages and reinstall them by *apt*. You can find more
details in
https://askubuntu.com/questions/431780/apt-get-install-vs-pip-install


-- 
Vladimir Botka

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/20220204055036.651ab7c3%40gmail.com.


pgpuHfPYdJXiw.pgp
Description: OpenPGP digital signature


Re: [ansible-project] issue in installation of ansible

2022-02-03 Thread Nico Kadel-Garcia
On Thu, Feb 3, 2022 at 9:08 PM Kevin Y  wrote:
>
> Hi Ubuntu is installed at windows10 and then the below commands are entered 
> in the Ubunto. It looks like the installing ansible is successful without 
> error message.
>
>
> $ sudo apt-get update
> $ sudo apt-get install software-properties-common
> $ sudo apt-add-repository ppa:ansible/ansible
> $ sudo apt-get update
> $ sudo apt-get install ansible -y

This may sound like a broken record, I've personally tried to help
peopole walk through this before. The "ansible" no longer contains nor
provides any functional component of the old "ansible" software, those
are now published as a tarball called "ansible-core", which is very
confusing. I suspect you need to clear away old copies or update your
copy of "ansible-core".

Also, "Ubuntu is installed at Windows 10" does not mean you're
actually getting the Ubuntu provided version of everything unless
you're running in a VM or profoundly separated environment. Windows
can have its own python installed, and being sure you got the right
one and marged them cleanly can be. well, an adventure.

> However, the installation mayby unsuccessful because we can see below message 
> with command "ansible -v". Please see the below. Did I miss some step for the 
> installation? Anyone can help for this?  Thank you
>
>
> admin1@Le:~$ ansible -v
> Traceback (most recent call last):

The "ansible" script and all its modules are in the "ansible-core"
package. You might simply discard the "ansible" package altogether and
use only "ansible-core" and see if it works for you. I've been
publishing .spec files to package up this stuff for RHEL based
operating systems, it's confusing over there as well.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAOCN9rxq88UTqYU3kf5Xh6RnU6uP9-kV__JO-_%2BZi%3DQ7GK9W4w%40mail.gmail.com.


Re: [ansible-project] issue in installation of ansible

2022-02-03 Thread Kevin Y
Thank you John for your reply!
Python3.8 is installed. I can see it with below command:

admin1@Le:~$ python3 --version
Python 3.8.10




On Thursday, February 3, 2022 at 9:12:18 PM UTC-5 jcp...@johnpetro.com 
wrote:

> Is python 3.8 installed?  If not, you might want to try that
>
> --John
>
> On Thu, Feb 3, 2022 at 9:08 PM Kevin Y  wrote:
>
>> Hi Ubuntu is installed at windows10 and then the below commands are 
>> entered in the Ubunto. It looks like the installing ansible is successful 
>> without error message. 
>>
>>
>> $ sudo apt-get update
>> $ sudo apt-get install software-properties-common
>> $ sudo apt-add-repository ppa:ansible/ansible
>> $ sudo apt-get update
>> $ sudo apt-get install ansible -y
>>
>>
>> However, the installation mayby unsuccessful because we can see below 
>> message with command "ansible -v". Please see the below. Did I miss some 
>> step for the installation? Anyone can help for this?  Thank you
>>
>>
>> admin1@Le:~$ ansible -v
>> Traceback (most recent call last):
>>   File "/usr/bin/ansible", line 44, in 
>> from ansible import context
>>   File "/usr/local/lib/python3.8/dist-packages/ansible/context.py", line 
>> 18, in 
>> from ansible.module_utils.common._collections_compat import Mapping, 
>> Set
>> ModuleNotFoundError: No module named 'ansible.module_utils'
>>
>>
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Ansible Project" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to ansible-proje...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/981a6842-ce60-4b79-bcca-5236900eae4en%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/6dc4c27e-5332-4670-9636-7e7982266939n%40googlegroups.com.


Re: [ansible-project] issue in installation of ansible

2022-02-03 Thread John Petro
Is python 3.8 installed?  If not, you might want to try that

--John

On Thu, Feb 3, 2022 at 9:08 PM Kevin Y  wrote:

> Hi Ubuntu is installed at windows10 and then the below commands are
> entered in the Ubunto. It looks like the installing ansible is successful
> without error message.
>
>
> $ sudo apt-get update
> $ sudo apt-get install software-properties-common
> $ sudo apt-add-repository ppa:ansible/ansible
> $ sudo apt-get update
> $ sudo apt-get install ansible -y
>
>
> However, the installation mayby unsuccessful because we can see below
> message with command "ansible -v". Please see the below. Did I miss some
> step for the installation? Anyone can help for this?  Thank you
>
>
> admin1@Le:~$ ansible -v
> Traceback (most recent call last):
>   File "/usr/bin/ansible", line 44, in 
> from ansible import context
>   File "/usr/local/lib/python3.8/dist-packages/ansible/context.py", line
> 18, in 
> from ansible.module_utils.common._collections_compat import Mapping,
> Set
> ModuleNotFoundError: No module named 'ansible.module_utils'
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ansible-project+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/981a6842-ce60-4b79-bcca-5236900eae4en%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAPAjob9fHGOHJyK-tp97F13%2BfxfLZMqm55uK28vmc85o7Nb8oQ%40mail.gmail.com.


[ansible-project] issue in installation of ansible

2022-02-03 Thread Kevin Y


Hi Ubuntu is installed at windows10 and then the below commands are entered 
in the Ubunto. It looks like the installing ansible is successful without 
error message. 


$ sudo apt-get update
$ sudo apt-get install software-properties-common
$ sudo apt-add-repository ppa:ansible/ansible
$ sudo apt-get update
$ sudo apt-get install ansible -y


However, the installation mayby unsuccessful because we can see below 
message with command "ansible -v". Please see the below. Did I miss some 
step for the installation? Anyone can help for this?  Thank you


admin1@Le:~$ ansible -v
Traceback (most recent call last):
  File "/usr/bin/ansible", line 44, in 
from ansible import context
  File "/usr/local/lib/python3.8/dist-packages/ansible/context.py", line 
18, in 
from ansible.module_utils.common._collections_compat import Mapping, Set
ModuleNotFoundError: No module named 'ansible.module_utils'



-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/981a6842-ce60-4b79-bcca-5236900eae4en%40googlegroups.com.