Sounds like a local dns resolution issue

On Mon, 12 Jun 2023 at 10:24, Azadeh Amirhosseini <az.amirhosse...@gmail.com>
wrote:

> Thanks for your reply.
> I did upgrade the ansible by:
> sudo pip3 install ansible-core==2.15
> and now the ansible-core is updated:
> $ ansible --version
> ansible [core 2.15.0]
>   config file = /home/ansible/.ansible.cfg
>   configured module search path = ['/home/ansible/library']
>   ansible python module location =
> /usr/local/lib/python3.9/site-packages/ansible
>   ansible collection location =
> /home/ansible/.ansible/collections:/usr/share/ansible/collections
>   executable location = /usr/local/bin/ansible
>   python version = 3.9.10 (main, Sep 23 2022, 00:00:00) [GCC 11.2.1
> 20220127 (Red Hat 11.2.1-9)] (/usr/bin/python3)
>   jinja version = 3.1.2
>   libyaml = True
>
> after running the command:
> ansible-galaxy collection install fortinet.fortios
>
> i get the error message:
> ERROR! Unknown error when attempting to call Galaxy at '
> https://galaxy.ansible.com/api/': <urlopen error [Errno -2] Name or
> service not known>. <urlopen error [Errno -2] Name or service not known>
>
>
>
> On Tuesday, June 6, 2023 at 8:15:50 PM UTC+2 Nico Kadel-Garcia wrote:
>
>> On Tue, Jun 6, 2023 at 9:46 AM Azadeh Amirhosseini
>> <az.amir...@gmail.com> wrote:
>> >
>> > Hi All,
>> > I have an ansible control node, which is the version 2.10.17
>>
>> Delete or replace that software, and update to a contemporary release
>> of ansible-core. There were big structural changes when ansible was
>> renamed ansible-core, and the enormous bundle of ansible collection
>> modules was renamed ansible. And yes, it's confusing, but that's what
>> happened. You now need "ansible-core".
>>
>> > i need to install fortigate collection by the command:
>> > ansible-galaxy collection install fortinet.fortios
>> > but i receive the error message (regardless what comes after
>> ansible-galaxy, i kepp on getting the same error message)
>> > ERROR! Unexpected Exception, this is probably a bug: cannot import name
>> 'CollectionRequirement'
>> > the full traceback was:
>> >
>> > Traceback (most recent call last):
>> > File "/usr/local/bin/ansible-galaxy", line 92, in <module>
>> > mycli = getattr(__import__("ansible.cli.%s" % sub, fromlist=[myclass]),
>> myclass)
>> > File "/usr/local/lib/python3.6/site-packages/ansible/cli/galaxy.py",
>> line 24, in <module>
>> > from ansible.galaxy.collection import (
>> > ImportError: cannot import name 'CollectionRequirement'
>> > is there any idea how to overcome it?
>> >
>> > --
>> > 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/4e045270-8396-4e92-8785-63e001a081bbn%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/c4507164-7190-4e3c-826a-449528de4225n%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/c4507164-7190-4e3c-826a-449528de4225n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
-- 
Sent from Gmail Mobile

-- 
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/CAF8BbLbbNY_4%3DpDXML3b8seZC5bB9k7QVv0gA2i_WrTB4p8tDw%40mail.gmail.com.

Reply via email to